forked from Shinonome/dots-hyprland
overview: search: put types of icons into loaders
This commit is contained in:
@@ -68,17 +68,28 @@ Button {
|
|||||||
anchors.rightMargin: root.horizontalMargin + root.buttonHorizontalPadding
|
anchors.rightMargin: root.horizontalMargin + root.buttonHorizontalPadding
|
||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
IconImage {
|
Loader {
|
||||||
visible: root.materialSymbol == ""
|
id: iconLoader
|
||||||
source: Quickshell.iconPath(root.itemIcon);
|
active: true
|
||||||
width: 35
|
sourceComponent: root.materialSymbol == "" ? iconImageComponent : materialSymbolComponent
|
||||||
height: 35
|
|
||||||
}
|
}
|
||||||
MaterialSymbol {
|
|
||||||
visible: root.materialSymbol != ""
|
Component {
|
||||||
text: root.materialSymbol
|
id: iconImageComponent
|
||||||
iconSize: 30
|
IconImage {
|
||||||
color: Appearance.m3colors.m3onSurface
|
source: Quickshell.iconPath(root.itemIcon)
|
||||||
|
width: 35
|
||||||
|
height: 35
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: materialSymbolComponent
|
||||||
|
MaterialSymbol {
|
||||||
|
text: root.materialSymbol
|
||||||
|
iconSize: 30
|
||||||
|
color: Appearance.m3colors.m3onSurface
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main text
|
// Main text
|
||||||
|
|||||||
Reference in New Issue
Block a user