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)
This commit is contained in:
parent
5346d77e8c
commit
d001733c24
@ -1196,9 +1196,15 @@ QRect QWindowsXPStyle::subElementRect(SubElement sr, const QStyleOption *option,
|
||||
if (qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option))
|
||||
{
|
||||
rect = QWindowsStyle::subElementRect(sr, option, widget);
|
||||
if (sr == SE_TabWidgetTabContents)
|
||||
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: {
|
||||
rect = QWindowsStyle::subElementRect(sr, option, widget);
|
||||
|
Loading…
Reference in New Issue
Block a user