From c1d95a30862d0d86cc00a55d47cf0be92f9e9fc5 Mon Sep 17 00:00:00 2001 From: bbedward Date: Sun, 4 Jan 2026 22:58:20 -0500 Subject: [PATCH] launcher: fix invalid icon rendering wrong icon --- quickshell/Widgets/AppIconRenderer.qml | 5 ++--- quickshell/Widgets/AppLauncherGridDelegate.qml | 2 +- quickshell/Widgets/AppLauncherListDelegate.qml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/quickshell/Widgets/AppIconRenderer.qml b/quickshell/Widgets/AppIconRenderer.qml index 4c570177..f4acebe5 100644 --- a/quickshell/Widgets/AppIconRenderer.qml +++ b/quickshell/Widgets/AppIconRenderer.qml @@ -1,5 +1,4 @@ import QtQuick -import QtQuick.Controls import Quickshell import Quickshell.Widgets import qs.Common @@ -54,7 +53,7 @@ Item { source: root.iconPath smooth: true asynchronous: true - visible: !root.isMaterial && !root.isUnicode && status === Image.Ready + visible: !root.isMaterial && !root.isUnicode && root.iconPath !== "" && status === Image.Ready } Rectangle { @@ -65,7 +64,7 @@ Item { anchors.rightMargin: root.fallbackRightMargin anchors.topMargin: root.fallbackTopMargin anchors.bottomMargin: root.fallbackBottomMargin - visible: !root.isMaterial && !root.isUnicode && iconImg.status !== Image.Ready + visible: !root.isMaterial && !root.isUnicode && (root.iconPath === "" || iconImg.status !== Image.Ready) color: root.fallbackBackgroundColor radius: Theme.cornerRadius border.width: 0 diff --git a/quickshell/Widgets/AppLauncherGridDelegate.qml b/quickshell/Widgets/AppLauncherGridDelegate.qml index dff8a109..d4269fd1 100644 --- a/quickshell/Widgets/AppLauncherGridDelegate.qml +++ b/quickshell/Widgets/AppLauncherGridDelegate.qml @@ -45,7 +45,7 @@ Rectangle { width: computedIconSize height: computedIconSize anchors.horizontalCenter: parent.horizontalCenter - iconValue: model.icon && model.icon !== "" ? model.icon : model.startupClass + iconValue: (model.icon && model.icon !== "") ? model.icon : "" iconSize: computedIconSize fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A" materialIconSizeAdjustment: root.iconMaterialSizeAdjustment diff --git a/quickshell/Widgets/AppLauncherListDelegate.qml b/quickshell/Widgets/AppLauncherListDelegate.qml index 09a5774b..f9531211 100644 --- a/quickshell/Widgets/AppLauncherListDelegate.qml +++ b/quickshell/Widgets/AppLauncherListDelegate.qml @@ -46,7 +46,7 @@ Rectangle { width: root.iconSize height: root.iconSize anchors.verticalCenter: parent.verticalCenter - iconValue: model.icon && model.icon !== "" ? model.icon : model.startupClass + iconValue: (model.icon && model.icon !== "") ? model.icon : "" iconSize: root.iconSize fallbackText: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A" iconMargins: root.iconMargins