[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 {
|
PlasmaCore.IconItem {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: control.display != T.AbstractButton.TextBesideIcon ? Qt.AlignCenter : Qt.AlignVCenter | Qt.AlignRight
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
@ -52,7 +52,7 @@ T.TabButton {
|
|||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
id: 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
|
visible: text.length > 0 && control.display !== T.AbstractButton.IconOnly
|
||||||
text: control.Kirigami.MnemonicData.richTextLabel
|
text: control.Kirigami.MnemonicData.richTextLabel
|
||||||
font: control.font
|
font: control.font
|
||||||
|
Loading…
x
Reference in New Issue
Block a user