Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.9.0
-
None
-
Arch Linux x86_64
Qt 5.9.0
KDE Konsole 17.04.2
Description
KDE Konsole's tabbar is broken with Qt 5.9. This is a regression with respect to Qt 5.8.
With a single tab the Konsole tabbar is arranged such that the tab occupies 50% of the bar and the rest is empty. The user can double click the empty space to create a new tab.
With Qt 5.9 the empty space is gone and the single tab does not look properly aligned.
This issue is caused by the solution to https://bugreports.qt.io/browse/QTBUG-58266, more specifically, by commit 175f33ed855b0a8a30daafacd4f48fa3f8e76a9b.
This patch fixes the problem:
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index 060d1f9a03..e67f6969e7 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -518,13 +518,11 @@ void QTabBarPrivate::layoutTabs() maxExtent = maxWidth; } - if (!expanding) { - // Mirror our front item. - tabChain[tabChainIndex].init(); - tabChain[tabChainIndex].expansive = (tabAlignment != Qt::AlignRight) - && (tabAlignment != Qt::AlignJustify); - tabChain[tabChainIndex].empty = true; - } + // Mirror our front item. + tabChain[tabChainIndex].init(); + tabChain[tabChainIndex].expansive = (tabAlignment != Qt::AlignRight) + && (tabAlignment != Qt::AlignJustify); + tabChain[tabChainIndex].empty = true; Q_ASSERT(tabChainIndex == tabChain.count() - 1); // add an assert just to make sure. // Do the calculation
See also:
https://bugs.kde.org/show_bug.cgi?id=380879
https://bugreports.qt.io/browse/QTBUG-58266