summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2011-04-05 11:20:06 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:44 +0200
commitd001733c2422430f98aca4813854affd33cc6d93 (patch)
tree049dc03eda9568cf52967235a3dd43c51f674ff0 /src
parent5346d77e8ccba0a7bfb0cc1f257a26865a1c9d42 (diff)
QTabWidget/Win: do not add content margin when documentMode enabled
QTabWidget has 2 pixel bottom and right content margin. This removes the margin to maximize the area available for content and improve consistency with other Qt styles when documentMode is enabled. Task-number: QTBUG-15769 Merge-request: 957 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com> (cherry picked from commit 23dd5cb45547de167f5c2e78554e9c3013e59998)
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 74a20fce29..4b2c3a59a4 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -1196,8 +1196,14 @@ QRect QWindowsXPStyle::subElementRect(SubElement sr, const QStyleOption *option,
if (qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option))
{
rect = QWindowsStyle::subElementRect(sr, option, widget);
- if (sr == SE_TabWidgetTabContents)
- rect.adjust(0, 0, -2, -2);
+ if (sr == SE_TabWidgetTabContents) {
+ if (const QTabWidget *tabWidget = qobject_cast<const QTabWidget *>(widget)) {
+ if (tabWidget->documentMode())
+ break;
+ }
+
+ rect.adjust(0, 0, -2, -2);
+ }
}
break;
case SE_TabWidgetTabBar: {