From 852e197334f699d07c1cf567c342f711d470d21b Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 23 Dec 2013 20:07:08 +0100 Subject: [PATCH] [ComboTabBar] Workaround for setting tabbbar height with Oxygen --- src/lib/tools/combotabbar.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/tools/combotabbar.cpp b/src/lib/tools/combotabbar.cpp index 3256262da..e4c49d778 100644 --- a/src/lib/tools/combotabbar.cpp +++ b/src/lib/tools/combotabbar.cpp @@ -17,6 +17,8 @@ * ============================================================ */ #include "combotabbar.h" #include "toolbutton.h" +#include "mainapplication.h" +#include "proxystyle.h" #include #include @@ -482,7 +484,17 @@ void ComboTabBar::setMouseTracking(bool enable) void ComboTabBar::setUpLayout() { - const int height = m_mainTabBar->height(); + int height = m_mainTabBar->height(); + + // Workaround for Oxygen theme. For some reason, m_mainTabBar->height() returns bigger + // height than it actually is. + if (mApp->proxyStyle() && mApp->proxyStyle()->name() == QLatin1String("oxygen")) { + height -= 4; + } + + if (height <= 0) { + return; + } setFixedHeight(height); m_pinnedTabBar->setFixedHeight(height);