mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
TabBar: Fix calculating pinned tab width
It takes into account cornerWidth and calculates correct value with RTL. For the last time now hopefully.
This commit is contained in:
parent
c506283534
commit
2283b41fdc
@ -464,10 +464,10 @@ void TabBar::tabInserted(int index)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QWidget *w = tabButton(0, iconButtonPosition());
|
QWidget *w = tabButton(0, iconButtonPosition());
|
||||||
const QRect r = tabRect(0);
|
if (w && w->parentWidget()) {
|
||||||
if (w && r.isValid()) {
|
const QRect wg = w->parentWidget()->geometry();
|
||||||
const int padding = w->geometry().x() - r.x();
|
const QRect wr = QStyle::visualRect(layoutDirection(), wg, w->geometry());
|
||||||
tabMetrics()->setPinnedWidth(iconButtonSize().width() + padding * 2);
|
tabMetrics()->setPinnedWidth(iconButtonSize().width() + wr.x() * 2);
|
||||||
setUpLayout();
|
setUpLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user