mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[ComboTabBar] Use initStyleOption workaround only for Bespin theme
It is needed only with Bespin. With other themes, it actually makes it worse.
This commit is contained in:
parent
79a81a5f8a
commit
0b6478d110
|
@ -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…
Reference in New Issue
Block a user