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