summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-11-16 14:08:59 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-11-16 14:18:51 (GMT)
commit6320dbb34a18f4fa822343c6661b9f34ce3fe38f (patch)
tree46ddf09b428c7bd997416d23c2e3e47111e80c33 /src
parent7916895ae64441b6d683f816718fc78fdafbfc62 (diff)
downloadQt-6320dbb34a18f4fa822343c6661b9f34ce3fe38f.zip
Qt-6320dbb34a18f4fa822343c6661b9f34ce3fe38f.tar.gz
Qt-6320dbb34a18f4fa822343c6661b9f34ce3fe38f.tar.bz2
Fixed tab and tab contents frame overlapping when using style sheets
When setting the contents frame layout, the overlapping amount used was the one from the base style because we were checking the wrong widget. We now ensure that it's the QTabWidget we are checking for the pane pseudo-element subrule. Reviewed-by: Olivier Task-number: QTBUG-2555
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 59210c3..8b40931 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -4637,6 +4637,7 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const
}
break;
+#ifndef QT_NO_TABWIDGET
case PM_TabBarTabHSpace:
case PM_TabBarTabVSpace:
subRule = renderRule(w, opt, PseudoElement_TabBarTab);
@@ -4660,11 +4661,14 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const
return 0;
break;
- case PM_TabBarBaseOverlap:
- if (hasStyleRule(w->parentWidget(), PseudoElement_TabWidgetPane)) {
+ case PM_TabBarBaseOverlap: {
+ const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w) ? w : w->parentWidget();
+ if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)) {
return 0;
}
break;
+ }
+#endif // QT_NO_TABWIDGET
case PM_SliderThickness: // horizontal slider's height (sizeHint)
case PM_SliderLength: // minimum length of slider