From ecd1e91e02277155e8efd33565aa108ec12cd6e7 Mon Sep 17 00:00:00 2001 From: Neil Chudleigh <5580824+nchudleigh@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:06:54 -0500 Subject: [PATCH] Stop app icons flickering when the launcher opens The icon's source was `!visible ? "" : ...`, and `visible` is effective visibility: it turns false whenever the launcher hides. Every hide dropped every app icon and every open reloaded it asynchronously, so image icons (apps, unlike glyph icons) drew blank for a few frames, and again as the size settled. Key the source on whether the row has an icon instead, and keep the previous image while a reload decodes (retainWhileLoading). Co-Authored-By: Claude Opus 5.5 --- ui/ResultRow.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/ResultRow.qml b/ui/ResultRow.qml index ab5a1ec..82ce548 100644 --- a/ui/ResultRow.qml +++ b/ui/ResultRow.qml @@ -157,13 +157,19 @@ Item { anchors.verticalCenter: parent.verticalCenter Image { + // Not `visible`: that turns false whenever the launcher hides, which + // dropped every icon and reloaded it blank on the next open. + readonly property bool wanted: row.iconName.length > 0 && row.glyph.length === 0 anchors.fill: parent - visible: row.iconName.length > 0 && row.glyph.length === 0 + visible: wanted fillMode: Image.PreserveAspectFit asynchronous: true + // Keep the old icon while a new source or size decodes, instead of a + // blank frame (Qt 6.8+). + retainWhileLoading: true sourceSize.width: width * Screen.devicePixelRatio sourceSize.height: height * Screen.devicePixelRatio - source: !visible ? "" : (row.appLibrary ? row.appLibrary.iconSource(row.iconName) : Quickshell.iconPath(row.iconName, "application-x-executable")) + source: !wanted ? "" : (row.appLibrary ? row.appLibrary.iconSource(row.iconName) : Quickshell.iconPath(row.iconName, "application-x-executable")) } Text {