[ComboTabBar] Use initStyleOption workaround only for Bespin theme

It is needed only with Bespin.
With other themes, it actually makes it worse.
remotes/origin/falkon
David Rosca 12 years ago
parent 79a81a5f8a
commit 0b6478d110
  1. 9
      src/lib/tabwidget/combotabbar.cpp

@ -1211,6 +1211,15 @@ void TabBarHelper::initStyleOption(QStyleOptionTab* option, int tabIndex) const
{
QTabBar::initStyleOption(option, tabIndex);
// Bespin doesn't highlight current tab when there is only one tab in tabbar
static int isBespin = -1;
if (isBespin == -1)
isBespin = mApp->styleName() == QL1S("bespin");
if (!isBespin)
return;
int index = m_isPinnedTabBar ? tabIndex : m_comboTabBar->pinnedTabsCount() + tabIndex;
if (m_comboTabBar->count() > 1) {

Loading…
Cancel
Save