1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

[ComboTabBar] Workaround for setting tabbbar height with Oxygen

This commit is contained in:
nowrep 2013-12-23 20:07:08 +01:00
parent 23876a3765
commit 852e197334

View File

@ -17,6 +17,8 @@
* ============================================================ */ * ============================================================ */
#include "combotabbar.h" #include "combotabbar.h"
#include "toolbutton.h" #include "toolbutton.h"
#include "mainapplication.h"
#include "proxystyle.h"
#include <QIcon> #include <QIcon>
#include <QHBoxLayout> #include <QHBoxLayout>
@ -482,7 +484,17 @@ void ComboTabBar::setMouseTracking(bool enable)
void ComboTabBar::setUpLayout() 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); setFixedHeight(height);
m_pinnedTabBar->setFixedHeight(height); m_pinnedTabBar->setFixedHeight(height);