secondary tab button: icon in loader

This commit is contained in:
end-4
2025-05-15 22:48:45 +02:00
parent 0f7eed736b
commit b9e116e17f
@@ -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