mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 04:42:05 -04:00
widgets: fallback when AnimatedImage probe fails to static Image
This commit is contained in:
@@ -65,11 +65,17 @@ Rectangle {
|
||||
Connections {
|
||||
target: probe
|
||||
function onStatusChanged() {
|
||||
if (probe.status !== Image.Ready)
|
||||
return;
|
||||
if (probe.frameCount <= 1) {
|
||||
switch (probe.status) {
|
||||
case Image.Ready:
|
||||
if (probe.frameCount <= 1) {
|
||||
staticImage.source = root.imageSource;
|
||||
probe.source = "";
|
||||
}
|
||||
break;
|
||||
case Image.Error:
|
||||
staticImage.source = root.imageSource;
|
||||
probe.source = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user