mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12:46:35 +01:00
ComboTabBar: Force close button on right side
This mainly applies to macOS where close buttons are normally on left side, but native macOS tabbar doesn't use icons and it looks wrong with icons.
This commit is contained in:
parent
ec84df81e0
commit
e4c2194177
@ -36,9 +36,17 @@ int ProxyStyle::styleHint(StyleHint hint, const QStyleOption* option, const QWid
|
|||||||
case QStyle::SH_TabBar_Alignment:
|
case QStyle::SH_TabBar_Alignment:
|
||||||
return Qt::AlignLeft;
|
return Qt::AlignLeft;
|
||||||
|
|
||||||
|
case QStyle::SH_TabBar_CloseButtonPosition:
|
||||||
|
if (qobject_cast<const TabBarHelper*>(widget)) {
|
||||||
|
return QTabBar::RightSide;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const
|
int ProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const
|
||||||
|
@ -760,7 +760,7 @@ QTabBar::ButtonPosition ComboTabBar::iconButtonPosition() const
|
|||||||
|
|
||||||
QTabBar::ButtonPosition ComboTabBar::closeButtonPosition() const
|
QTabBar::ButtonPosition ComboTabBar::closeButtonPosition() const
|
||||||
{
|
{
|
||||||
return (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, this);
|
return (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, m_mainTabBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize ComboTabBar::iconButtonSize() const
|
QSize ComboTabBar::iconButtonSize() const
|
||||||
|
Loading…
Reference in New Issue
Block a user