update fixed size hints as soon as the tabwidgetmode changes

svn path=/trunk/KDE/kdelibs/; revision=1115431
This commit is contained in:
Marco Martin 2010-04-16 12:51:07 +00:00
parent b6f75d6e46
commit 6ff8621d3a

View File

@ -144,6 +144,13 @@ void TabBarPrivate::updateTabWidgetMode()
}
tabWidgetMode = tabWidget;
if (!tabWidgetMode) {
q->setMinimumSize(QSize(0, 0));
q->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
} else {
tabProxy->native->setMinimumSize(QSize(0,0));
tabProxy->setMinimumSize(QSize(0,0));
}
}
void TabBarPrivate::slidingNewPageCompleted()
@ -198,7 +205,6 @@ void TabBarPrivate::shapeChanged(const QTabBar::Shape shape)
}
tabProxy->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
}
tabProxy->setPreferredSize(tabProxy->native->sizeHint());
}
void TabBarPrivate::setPalette()
@ -339,6 +345,7 @@ void TabBar::resizeEvent(QGraphicsSceneResizeEvent * event)
setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
} else {
d->tabProxy->native->setMinimumSize(QSize(0,0));
d->tabProxy->setMinimumSize(QSize(0,0));
}
}