From 86021afdf5969a7bc7103823f7489179b836c584 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 28 Aug 2019 10:43:22 +0200 Subject: [PATCH] Revert "make button icons follow a reasonable size and layout" This reverts commit f9736191161b29d77742778f5ad109ae43e12e2b. --- .../plasmacomponents3/Button.qml | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/declarativeimports/plasmacomponents3/Button.qml b/src/declarativeimports/plasmacomponents3/Button.qml index f73da70f4..b7e7df40d 100644 --- a/src/declarativeimports/plasmacomponents3/Button.qml +++ b/src/declarativeimports/plasmacomponents3/Button.qml @@ -43,23 +43,15 @@ T.Button { Kirigami.MnemonicData.label: control.text contentItem: RowLayout { - Item { - Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium + Kirigami.Units.largeSpacing - Layout.fillWidth: !label.visible + PlasmaCore.IconItem { + id: icon + Layout.fillWidth: true Layout.fillHeight: true - visible: icon.source.length > 0 - PlasmaCore.IconItem { - id: icon - anchors.centerIn: parent - visible: parent.visible - height: Kirigami.Units.iconSizes.smallMedium - width: Kirigami.Units.iconSizes.smallMedium - colorGroup: PlasmaCore.Theme.ButtonColorGroup - source: control.icon ? (control.icon.name || control.icon.source) : "" - } + colorGroup: PlasmaCore.Theme.ButtonColorGroup + visible: source.length > 0 + source: control.icon ? (control.icon.name || control.icon.source) : "" } Label { - id: label Layout.fillWidth: !icon.visible Layout.fillHeight: true visible: text.length > 0