From a30aac169a24e8c6e88330f5bf7949a96a392784 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 2 May 2014 21:25:49 +0200 Subject: [PATCH] [ComboTabBar] Fixed pinned tabs being hidden when there are no normal tabs --- src/lib/tabwidget/combotabbar.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/tabwidget/combotabbar.cpp b/src/lib/tabwidget/combotabbar.cpp index e9bf7457a..ace3b92ce 100644 --- a/src/lib/tabwidget/combotabbar.cpp +++ b/src/lib/tabwidget/combotabbar.cpp @@ -535,7 +535,8 @@ void ComboTabBar::setUpLayout() if (isVisible() && m_mainTabBar->count() > 0) { // ComboTabBar is now visible, we can sync heights of both tabbars - m_pinnedTabBar->setFixedHeight(m_mainTabBar->height()); + m_pinnedTabBar->setFixedHeight(m_mainTabBar->sizeHint().height()); + m_mainTabBar->setFixedHeight(m_mainTabBar->sizeHint().height()); } } @@ -840,11 +841,6 @@ int ComboTabBar::toLocalIndex(int globalIndex) const void ComboTabBar::updatePinnedTabBarVisibility() { m_pinnedTabBarWidget->setVisible(pinnedTabsCount() > 0); - - if (pinnedTabsCount() > 0) { - m_pinnedTabBarWidget->setFixedHeight(m_mainTabBarWidget->height()); - m_pinnedTabBar->setFixedHeight(m_mainTabBar->height()); - } } void ComboTabBar::setMinimumWidths()