mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12: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;
|
||||
}
|
||||
QWidget *w = tabButton(0, iconButtonPosition());
|
||||
const QRect r = tabRect(0);
|
||||
if (w && r.isValid()) {
|
||||
const int padding = w->geometry().x() - r.x();
|
||||
tabMetrics()->setPinnedWidth(iconButtonSize().width() + padding * 2);
|
||||
if (w && w->parentWidget()) {
|
||||
const QRect wg = w->parentWidget()->geometry();
|
||||
const QRect wr = QStyle::visualRect(layoutDirection(), wg, w->geometry());
|
||||
tabMetrics()->setPinnedWidth(iconButtonSize().width() + wr.x() * 2);
|
||||
setUpLayout();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user