From 6e166d139a81b53cbb50a8370d59f7269c3a10cb Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 20 Jun 2017 21:18:13 +0200 Subject: [PATCH] Fix alignment of scroll buttons in tab bar --- qutebrowser/mainwindow/tabwidget.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 2c4eb6eab..9168a28b6 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -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)