diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/widgets/qtabbar.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index b9020253a5..85bc9a4a09 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -447,9 +447,10 @@ void QTabBarPrivate::layoutTabs() QVector<QLayoutStruct> tabChain(tabList.count() + 2); // We put an empty item at the front and back and set its expansive attribute - // depending on tabAlignment. + // depending on tabAlignment and expanding. tabChain[tabChainIndex].init(); - tabChain[tabChainIndex].expansive = (tabAlignment != Qt::AlignLeft) + tabChain[tabChainIndex].expansive = (!expanding) + && (tabAlignment != Qt::AlignLeft) && (tabAlignment != Qt::AlignJustify); tabChain[tabChainIndex].empty = true; ++tabChainIndex; @@ -514,13 +515,12 @@ 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 = (!expanding) + && (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 |