1
0
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:
bbedward
2026-02-23 19:03:14 -05:00
parent e83da53162
commit 056f298cdf

View File

@@ -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;
}
}
}