overview: search: put types of icons into loaders

This commit is contained in:
end-4
2025-05-15 22:49:25 +02:00
parent b9e116e17f
commit 2499675687
@@ -68,18 +68,29 @@ Button {
anchors.rightMargin: root.horizontalMargin + root.buttonHorizontalPadding anchors.rightMargin: root.horizontalMargin + root.buttonHorizontalPadding
// Icon // Icon
Loader {
id: iconLoader
active: true
sourceComponent: root.materialSymbol == "" ? iconImageComponent : materialSymbolComponent
}
Component {
id: iconImageComponent
IconImage { IconImage {
visible: root.materialSymbol == "" source: Quickshell.iconPath(root.itemIcon)
source: Quickshell.iconPath(root.itemIcon);
width: 35 width: 35
height: 35 height: 35
} }
}
Component {
id: materialSymbolComponent
MaterialSymbol { MaterialSymbol {
visible: root.materialSymbol != ""
text: root.materialSymbol text: root.materialSymbol
iconSize: 30 iconSize: 30
color: Appearance.m3colors.m3onSurface color: Appearance.m3colors.m3onSurface
} }
}
// Main text // Main text
ColumnLayout { ColumnLayout {