From 8e4f578b329d6944989a1fe8e5149aa872054c1d Mon Sep 17 00:00:00 2001 From: purian23 Date: Thu, 10 Jul 2025 22:32:31 -0400 Subject: [PATCH] App drawer icon updates --- Widgets/AppLauncher.qml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Widgets/AppLauncher.qml b/Widgets/AppLauncher.qml index d11f535f..153b0468 100644 --- a/Widgets/AppLauncher.qml +++ b/Widgets/AppLauncher.qml @@ -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 re‑entrancy 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) + } + } + } } }