Simplify setting the size for background tabs
We can simply look at the size of the existing open tab.
This commit is contained in:
parent
3756d9d76b
commit
a26fc89f49
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user