From b001ebb06be0b9d43ae0b5011a8d2b0455082d84 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 28 Apr 2009 14:44:32 +0200 Subject: Fixed tabbar position reset on palette change We do not need to relayout on all changeEvents. The only events that should change the layout of tabs are StyleChange and FontChange. LayoutDirectionChange is separately by layouts. Task-number: 188389 Reviewed-by: ogoffart --- src/gui/widgets/qtabbar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index b562b1f..49de8c1 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -1941,8 +1941,10 @@ void QTabBar::changeEvent(QEvent *event) if (event->type() == QEvent::StyleChange) { d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this)); d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this); + d->refresh(); + } else if (event->type() == QEvent::FontChange) { + d->refresh(); } - d->refresh(); QWidget::changeEvent(event); } -- cgit v0.12