Truly independent web browser
UI/Qt: Avoid calculating tab sizes that we replace
Callum Law68cdfecde276
diff --git a/UI/Qt/TabBar.cpp b/UI/Qt/TabBar.cppindex fb11f67ec9a..dc75a2f0cd4 100644--- a/UI/Qt/TabBar.cpp+++ b/UI/Qt/TabBar.cpp@@ -988,7 +988,7 @@ QSize TabBar::minimumSizeHint() constQSize TabBar::tabSizeHint(int index) const{- auto hint = QTabBar::tabSizeHint(index);+ QSize hint;if (tab_layout() != TabLayout::Horizontal) {hint.setWidth(vertical_tab_width(m_available_width, tab_layout()));@@ -1009,6 +1009,8 @@ QSize TabBar::tabSizeHint(int index) const// NB: While the widths are locked, the tabs keep the share they had.auto width = max(horizontal_tab_min_width(index), m_locked_tab_width.value_or(horizontal_tab_share()));hint.setWidth(width + end_room);+ } else {+ hint = QTabBar::tabSizeHint(index);}hint.setHeight(HORIZONTAL_TAB_HEIGHT);