From a26fc89f4918968ec99d100ffd28a78e20393e42 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 19 Jul 2017 11:59:44 +0200 Subject: [PATCH] Simplify setting the size for background tabs We can simply look at the size of the existing open tab. --- qutebrowser/mainwindow/tabbedbrowser.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 5c0cd16f8..df0048516 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -449,13 +449,7 @@ class TabbedBrowser(tabwidget.TabWidget): # Make sure the background tab has the correct initial size. # With a foreground tab, it's going to be resized correctly by the # layout anyways. - if self.tabBar().vertical: - tab_size = QSize(self.width() - self.tabBar().width(), - self.height()) - else: - tab_size = QSize(self.width(), - self.height() - self.tabBar().height()) - tab.resize(tab_size) + tab.resize(self.currentWidget().size()) self.tab_index_changed.emit(self.currentIndex(), self.count()) else: self.setCurrentWidget(tab)