summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsxpstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/styles/qwindowsxpstyle.cpp')
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 8858475..4189c78 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -3678,7 +3678,9 @@ QSize QWindowsXPStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt
sz += QSize(borderSize.cxLeftWidth + borderSize.cxRightWidth - 2,
borderSize.cyBottomHeight + borderSize.cyTopHeight - 2);
}
- sz += QSize(23, 0); //arrow button
+ const int textMargins = 2*(proxy()->pixelMetric(PM_FocusFrameHMargin) + 1);
+ sz += QSize(qMax(pixelMetric(QStyle::PM_ScrollBarExtent, option, widget)
+ + textMargins, 23), 0); //arrow button
}
}
break;