From 9df6f42c60ee25eece34926b31fdcb6b4af90d0f Mon Sep 17 00:00:00 2001 From: Mikel Johnson Date: Sat, 14 Nov 2020 16:40:20 +0000 Subject: [PATCH] [TabButton] Align center icon and text when text is beside the icon --- src/declarativeimports/plasmacomponents3/TabButton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarativeimports/plasmacomponents3/TabButton.qml b/src/declarativeimports/plasmacomponents3/TabButton.qml index a388f1a9f..f4a207e4d 100644 --- a/src/declarativeimports/plasmacomponents3/TabButton.qml +++ b/src/declarativeimports/plasmacomponents3/TabButton.qml @@ -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