From a7c8ba332b9891a6161248b56de3e46e647f0da7 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 4 Nov 2025 20:38:42 -0500 Subject: [PATCH] spotlight: fix potential binding loop --- Modals/Spotlight/SpotlightContent.qml | 2 +- Widgets/AppIconRenderer.qml | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Modals/Spotlight/SpotlightContent.qml b/Modals/Spotlight/SpotlightContent.qml index 4c3821c5..b3d04e53 100644 --- a/Modals/Spotlight/SpotlightContent.qml +++ b/Modals/Spotlight/SpotlightContent.qml @@ -201,7 +201,7 @@ Item { textColor: Theme.surfaceText font.pixelSize: Theme.fontSizeLarge enabled: parentModal ? parentModal.spotlightOpen : true - placeholderText: searchMode === "files" ? "Search files..." : "Search apps..." + placeholderText: "" ignoreLeftRightKeys: appLauncher.viewMode !== "list" ignoreTabKeys: true keyForwardTargets: [spotlightKeyHandler] diff --git a/Widgets/AppIconRenderer.qml b/Widgets/AppIconRenderer.qml index 7b6a1841..96845b4b 100644 --- a/Widgets/AppIconRenderer.qml +++ b/Widgets/AppIconRenderer.qml @@ -22,10 +22,11 @@ Item { property real fallbackTopMargin: 0 property real fallbackBottomMargin: 0 - property bool isMaterial: iconValue.indexOf("material:") === 0 - property bool isUnicode: iconValue.indexOf("unicode:") === 0 - property string materialName: isMaterial ? iconValue.substring(9) : "" - property string unicodeChar: isUnicode ? iconValue.substring(8) : "" + readonly property bool isMaterial: iconValue.startsWith("material:") + readonly property bool isUnicode: iconValue.startsWith("unicode:") + readonly property string materialName: isMaterial ? iconValue.substring(9) : "" + readonly property string unicodeChar: isUnicode ? iconValue.substring(8) : "" + readonly property string iconPath: isMaterial || isUnicode ? "" : Quickshell.iconPath(iconValue, true) visible: iconValue !== undefined && iconValue !== "" @@ -49,7 +50,7 @@ Item { id: iconImg anchors.fill: parent - source: root.isMaterial || root.isUnicode ? "" : Quickshell.iconPath(root.iconValue, true) + source: root.iconPath smooth: true asynchronous: true visible: !root.isMaterial && !root.isUnicode && status === Image.Ready