Fix launcher application icon resolution

This commit is contained in:
David Heinemeier Hansson
2026-07-15 17:45:27 -07:00
parent 298e14071b
commit 47f3074e4e
2 changed files with 21 additions and 4 deletions
+7 -4
View File
@@ -80,6 +80,9 @@ Item {
root.cursorActive = true
root.disarmHover()
root.rebuildDisplay()
// The shell may start before first-install packages have finished placing
// their icons. Refresh here even when the desktop entry list did not change.
if (!iconIndexScan.running) iconIndexScan.running = true
Qt.callLater(function() { keyCatcher.forceActiveFocus() })
}
@@ -100,12 +103,12 @@ Item {
if (value.length === 0) return Quickshell.iconPath("application-x-executable", true)
if (value.indexOf("file://") === 0 || value.indexOf("image://") === 0) return value
if (value.charAt(0) === "/") return Util.fileUrl(value)
var themed = Quickshell.iconPath(value, true)
if (themed.length > 0) return themed
// Qt's themed lookup missed (commonly a just-installed app whose icon landed
// after our icon cache warmed). Fall back to the on-disk index we scanned.
// Prefer the context-limited app/device index. An unconstrained themed
// lookup can resolve an app name such as "zoom" to an action icon instead.
var found = root.iconIndex[value]
if (found) return Util.fileUrl(found)
var themed = Quickshell.iconPath(value, true)
if (themed.length > 0) return themed
return Quickshell.iconPath("application-x-executable", true)
}