Merge branch 'pr/2747'

This commit is contained in:
Florian Bruhin 2017-07-05 22:14:07 +02:00
commit a4833fcc46
2 changed files with 12 additions and 1 deletions

View File

@ -193,6 +193,7 @@ Contributors, sorted by the number of commits in descending order:
* knaggita
* Oliver Caldwell
* Nikolay Amiantov
* Marius
* Julian Weigt
* Tomasz Kramkowski
* Sebastian Frysztak
@ -217,7 +218,6 @@ Contributors, sorted by the number of commits in descending order:
* Michał Góral
* Michael Ilsaas
* Martin Zimmermann
* Marius
* Link
* Jussi Timperi
* Cosmin Popescu

View File

@ -761,6 +761,17 @@ class TabBarStyle(QCommonStyle):
rct = super().subElementRect(sr, opt, widget)
return rct
else:
try:
# We need this so the left scroll button is aligned properly.
# Otherwise, empty space will be shown after the last tab even
# though the button width is set to 0
#
# QStyle.SE_TabBarScrollLeftButton was added in Qt 5.7
if sr == QStyle.SE_TabBarScrollLeftButton:
return super().subElementRect(sr, opt, widget)
except AttributeError:
pass
return self._style.subElementRect(sr, opt, widget)
def _tab_layout(self, opt):