diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-04-28 12:44:32 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-04-28 12:46:48 (GMT) |
commit | b001ebb06be0b9d43ae0b5011a8d2b0455082d84 (patch) | |
tree | e1aea5ecd976cf3c1c511f458bcc27b9f353dc12 /src/gui/widgets | |
parent | 99d3a9cad689cf635a4bd16711a9d6a6017eea7d (diff) | |
download | Qt-b001ebb06be0b9d43ae0b5011a8d2b0455082d84.zip Qt-b001ebb06be0b9d43ae0b5011a8d2b0455082d84.tar.gz Qt-b001ebb06be0b9d43ae0b5011a8d2b0455082d84.tar.bz2 |
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
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qtabbar.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |