From cc59bb599218a7ea5f0eb43cc6790a6ef7813fd1 Mon Sep 17 00:00:00 2001 From: Noah Davis Date: Thu, 13 May 2021 23:01:15 -0400 Subject: [PATCH] PC3 TabButton: Fix horizontal content alignment with max text width bug was caused by commit a45bd758001310d39b9c36ee1617cc12d --- src/declarativeimports/plasmacomponents3/TabButton.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarativeimports/plasmacomponents3/TabButton.qml b/src/declarativeimports/plasmacomponents3/TabButton.qml index c368a85bb..8dd86531b 100644 --- a/src/declarativeimports/plasmacomponents3/TabButton.qml +++ b/src/declarativeimports/plasmacomponents3/TabButton.qml @@ -61,6 +61,8 @@ T.TabButton { Label { id: label Layout.fillWidth: true + // allow it to shrink below implicitWidth, but not exceed implicitWidth + Layout.maximumWidth: Math.ceil(implicitWidth) visible: text.length > 0 && control.display !== T.AbstractButton.IconOnly text: control.Kirigami.MnemonicData.richTextLabel font: control.font