Fix alignment of scroll buttons in tab bar

This commit is contained in:
Marius 2017-06-20 21:18:13 +02:00
parent cb5cd1a910
commit 6e166d139a

View File

@ -759,6 +759,12 @@ class TabBarStyle(QCommonStyle):
# style differences...
rct = super().subElementRect(sr, opt, widget)
return rct
elif sr == QStyle.SE_TabBarScrollLeftButton:
# 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
rct = super().subElementRect(sr, opt, widget)
return rct
else:
return self._style.subElementRect(sr, opt, widget)