summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ulattil@nokia.com>2009-10-29 12:46:45 (GMT)
committerPrasanth Ullattil <prasanth.ulattil@nokia.com>2009-10-29 12:46:45 (GMT)
commit9551b8c349ce4e15a57c24a2408ee1b73c2b7510 (patch)
treef4d34204428bafe8fcf68327677212401fd8396b /src/gui/widgets
parentb1f9882fa52745c922eb0109daa011908214dcf7 (diff)
downloadQt-9551b8c349ce4e15a57c24a2408ee1b73c2b7510.zip
Qt-9551b8c349ce4e15a57c24a2408ee1b73c2b7510.tar.gz
Qt-9551b8c349ce4e15a57c24a2408ee1b73c2b7510.tar.bz2
Tabs with corner widgets are drawn incorrectly in document mode on Mac.
While drawing the tabbar frame, mac style needs the QTabBar pointer to calculate the correct size. Since the QTabWidget also uses the PE_FrameTabBarBase to draw background of the corner widgets, the mac style has to use position passed with the style option. This only works with horizontal tabs. Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qtabwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp
index 9aeb033..0c89a72 100644
--- a/src/gui/widgets/qtabwidget.cpp
+++ b/src/gui/widgets/qtabwidget.cpp
@@ -1167,8 +1167,8 @@ void QTabWidget::tabRemoved(int index)
void QTabWidget::paintEvent(QPaintEvent *)
{
Q_D(QTabWidget);
- QStylePainter p(this);
if (documentMode()) {
+ QStylePainter p(this, tabBar());
if (QWidget *w = cornerWidget(Qt::TopLeftCorner)) {
QStyleOptionTabBarBaseV2 opt;
QTabBarPrivate::initStyleBaseOption(&opt, tabBar(), w->size());
@@ -1185,7 +1185,7 @@ void QTabWidget::paintEvent(QPaintEvent *)
}
return;
}
-
+ QStylePainter p(this);
QStyleOptionTabWidgetFrame opt;
initStyleOption(&opt);
opt.rect = d->panelRect;