Fix initial tab sizing with vertical tabbar

This commit is contained in:
Florian Bruhin 2017-06-16 23:00:16 +02:00
parent b37d040d44
commit 9cc688ea2b
2 changed files with 15 additions and 2 deletions

View File

@ -433,8 +433,12 @@ 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.
tab_size = QSize(self.width(),
self.height() - self.tabBar().height())
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)
self.tab_index_changed.emit(self.currentIndex(), self.count())
else:

View File

@ -116,3 +116,12 @@ Feature: Javascript stuff
And I wait for "[*/data/javascript/windowsize.html:*] loaded" in the log
And I run :tab-next
Then the window sizes should be the same
Scenario: Checking visible/invisible window size with vertical tabbar
When I run :tab-only
And I set general -> log-javascript-console to info
And I set tabs -> position to left
And I open data/javascript/windowsize.html in a new background tab
And I wait for "[*/data/javascript/windowsize.html:*] loaded" in the log
And I run :tab-next
Then the window sizes should be the same