mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
ComboTabBar: Apply padding adjustment to all tabs
This commit is contained in:
parent
e21e147bbb
commit
95921692be
@ -1455,7 +1455,7 @@ void TabBarHelper::initStyleOption(QStyleOptionTab* option, int tabIndex) const
|
|||||||
QTabBar::initStyleOption(option, tabIndex);
|
QTabBar::initStyleOption(option, tabIndex);
|
||||||
|
|
||||||
// Workaround zero padding when tabs are styled using style sheets
|
// Workaround zero padding when tabs are styled using style sheets
|
||||||
if (m_tabPadding > 0 && (tabIndex != currentIndex() || m_dragInProgress)) {
|
if (m_tabPadding) {
|
||||||
const QRect textRect = style()->subElementRect(QStyle::SE_TabBarTabText, option, this);
|
const QRect textRect = style()->subElementRect(QStyle::SE_TabBarTabText, option, this);
|
||||||
const int width = textRect.width() - 2 * m_tabPadding;
|
const int width = textRect.width() - 2 * m_tabPadding;
|
||||||
option->text = option->fontMetrics.elidedText(tabText(tabIndex), elideMode(), width, Qt::TextShowMnemonic);
|
option->text = option->fontMetrics.elidedText(tabText(tabIndex), elideMode(), width, Qt::TextShowMnemonic);
|
||||||
|
Loading…
Reference in New Issue
Block a user