From 249967568718395a997f178ea0fc8b649d0b8b27 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 15 May 2025 22:49:25 +0200 Subject: [PATCH] overview: search: put types of icons into loaders --- .../modules/overview/SearchItem.qml | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.config/quickshell/modules/overview/SearchItem.qml b/.config/quickshell/modules/overview/SearchItem.qml index 3f10ab9eb..eba2ebd9f 100644 --- a/.config/quickshell/modules/overview/SearchItem.qml +++ b/.config/quickshell/modules/overview/SearchItem.qml @@ -68,17 +68,28 @@ Button { anchors.rightMargin: root.horizontalMargin + root.buttonHorizontalPadding // Icon - IconImage { - visible: root.materialSymbol == "" - source: Quickshell.iconPath(root.itemIcon); - width: 35 - height: 35 + Loader { + id: iconLoader + active: true + sourceComponent: root.materialSymbol == "" ? iconImageComponent : materialSymbolComponent } - MaterialSymbol { - visible: root.materialSymbol != "" - text: root.materialSymbol - iconSize: 30 - color: Appearance.m3colors.m3onSurface + + Component { + id: iconImageComponent + IconImage { + source: Quickshell.iconPath(root.itemIcon) + width: 35 + height: 35 + } + } + + Component { + id: materialSymbolComponent + MaterialSymbol { + text: root.materialSymbol + iconSize: 30 + color: Appearance.m3colors.m3onSurface + } } // Main text