center text when no icon
This commit is contained in:
parent
828ab59eb1
commit
584f7709e1
@ -40,13 +40,15 @@ T.Button {
|
||||
|
||||
contentItem: RowLayout {
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
colorGroup: PlasmaCore.Theme.ButtonColorGroup
|
||||
visible: source.length > 0
|
||||
source: control.icon ? (control.icon.name || control.icon.source) : ""
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: !icon.visible
|
||||
visible: text.length > 0
|
||||
text: control.text
|
||||
font: control.font
|
||||
|
Loading…
Reference in New Issue
Block a user