1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 14:05:38 -05:00

App drawer icon updates

This commit is contained in:
purian23
2025-07-10 22:32:31 -04:00
parent e16dbdb8bf
commit 8e4f578b32

View File

@@ -263,12 +263,27 @@ PanelWindow {
source: _iconName ? Quickshell.iconPath(_iconName, "") : ""
smooth: true
asynchronous: true
onStatusChanged: {
if (status === Image.Error || status === Image.Null || !source) {
// Image.Null = 0, Image.Ready = 1, Image.Loading = 2, Image.Error = 3
if (status === Image.Error ||
status === Image.Null ||
(!source && _iconName)) {
// defer the swap to avoid reentrancy in Loader
Qt.callLater(() => img.parent.sourceComponent = fallbackComponent)
}
}
// Add timeout fallback for stuck loading icons
Timer {
interval: 3000 // 3 second timeout
running: img.status === Image.Loading
onTriggered: {
if (img.status === Image.Loading) {
Qt.callLater(() => img.parent.sourceComponent = fallbackComponent)
}
}
}
}
}