[plasma/union/Plasma/6.7] src/output/qtquick/style: output/quick: Ensure TabBar doesn't try to squeeze TabButton too small

Arjen Hiemstra <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 787600ad5a51d404521bffbb968ba34c4642ef37 by Arjen Hiemstra.
Committed on 17/07/2026 at 09:48.
Pushed by ahiemstra into branch 'Plasma/6.7'.

output/quick: Ensure TabBar doesn't try to squeeze TabButton too small

Apparently TabBar tries to divide space evently between tabs, but when
relying on implicit sizes this means that bigger buttons become too
small because the total size is divided amongs the buttons.


(cherry picked from commit 8f293ff279aa4cfd4f49271ee227b01e28306de3)

Co-authored-by: Arjen Hiemstra <[email protected]>

M  +5    -0    src/output/qtquick/style/TabButton.qml

https://invent.kde.org/plasma/union/-/commit/787600ad5a51d404521bffbb968ba34c4642ef37

diff --git a/src/output/qtquick/style/TabButton.qml b/src/output/qtquick/style/TabButton.qml
index 7a59e28f..5627ddb4 100644
--- a/src/output/qtquick/style/TabButton.qml
+++ b/src/output/qtquick/style/TabButton.qml
@@ -37,6 +37,11 @@ T.TabButton {
     implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
                              Union.Positioner.implicitHeight)
 
+    // TabBar divides the space between buttons equally, which leads to
+    // weirdness when relying on implicit sizes. So explicitly set the width
+    // to tabbar doesn't try to divide up things.
+    width: implicitWidth
+
     hoverEnabled: Application.styleHints.useHoverEffects
 
     leftPadding: Union.Style.properties.layout.padding.left
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.