summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-04-28 12:44:32 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-04-28 12:46:48 (GMT)
commitb001ebb06be0b9d43ae0b5011a8d2b0455082d84 (patch)
treee1aea5ecd976cf3c1c511f458bcc27b9f353dc12
parent99d3a9cad689cf635a4bd16711a9d6a6017eea7d (diff)
downloadQt-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
-rw-r--r--src/gui/widgets/qtabbar.cpp4
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);
}