diff options
Diffstat (limited to 'qutebrowser/mainwindow/tabwidget.py')
-rw-r--r-- | qutebrowser/mainwindow/tabwidget.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index c7823f84e..eeee223aa 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -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): |