mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-08 22:45:38 -05:00
App drawer icon updates
This commit is contained in:
@@ -263,12 +263,27 @@ PanelWindow {
|
|||||||
source: _iconName ? Quickshell.iconPath(_iconName, "") : ""
|
source: _iconName ? Quickshell.iconPath(_iconName, "") : ""
|
||||||
smooth: true
|
smooth: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
onStatusChanged: {
|
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 re‑entrancy in Loader
|
// defer the swap to avoid re‑entrancy in Loader
|
||||||
Qt.callLater(() => img.parent.sourceComponent = fallbackComponent)
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user