forked from Shinonome/dots-hyprland
secondary tab button: icon in loader
This commit is contained in:
@@ -35,9 +35,17 @@ TabButton {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 0
|
spacing: 0
|
||||||
MaterialSymbol {
|
|
||||||
visible: buttonIcon?.length > 0
|
Loader {
|
||||||
|
id: iconLoader
|
||||||
|
active: buttonIcon?.length > 0
|
||||||
|
sourceComponent: buttonIcon?.length > 0 ? materialSymbolComponent : null
|
||||||
Layout.rightMargin: 5
|
Layout.rightMargin: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: materialSymbolComponent
|
||||||
|
MaterialSymbol {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: buttonIcon
|
text: buttonIcon
|
||||||
iconSize: Appearance.font.pixelSize.huge
|
iconSize: Appearance.font.pixelSize.huge
|
||||||
@@ -51,6 +59,7 @@ TabButton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
StyledText {
|
StyledText {
|
||||||
id: buttonTextWidget
|
id: buttonTextWidget
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|||||||
Reference in New Issue
Block a user