[TabButton] Align center icon and text when text is beside the icon
This commit is contained in:
parent
90e92a9c67
commit
9df6f42c60
@ -32,7 +32,7 @@ T.TabButton {
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.alignment: control.display != T.AbstractButton.TextBesideIcon ? Qt.AlignCenter : Qt.AlignVCenter | Qt.AlignRight
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
@ -52,7 +52,7 @@ T.TabButton {
|
||||
}
|
||||
Label {
|
||||
id: label
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: control.display != T.AbstractButton.TextBesideIcon || icon.source.length === 0 ? Qt.AlignCenter : Qt.AlignVCenter | Qt.AlignLeft
|
||||
visible: text.length > 0 && control.display !== T.AbstractButton.IconOnly
|
||||
text: control.Kirigami.MnemonicData.richTextLabel
|
||||
font: control.font
|
||||
|
Loading…
Reference in New Issue
Block a user