summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsstyle.cpp
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-24 16:15:07 +0100
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-24 17:42:52 +0100
commit01140c6c47ab073ffd35f4534f2222dd38f29127 (patch)
tree1d372065ceb578ff89141b9490303c80cb42fec9 /src/gui/styles/qwindowsstyle.cpp
parent6c8c62f470e31ff2f74e2a5d3ba71d36da5f6d77 (diff)
Wrong value for PM_ScrollBarExtent on Windows XP.
The NONCLIENTMETRICSW::iPaddedBorderWidth member is supported only on Windows Vista and above. So when calling the SystemParametersInfo for SPI_GETNONCLIENTMETRICS on Windows XP, the size for that member needs to be removed from NONCLIENTMETRICSW::cbSize. Task-number: QTBUG-8639 Reviewed-by: Thierry
Diffstat (limited to 'src/gui/styles/qwindowsstyle.cpp')
-rw-r--r--src/gui/styles/qwindowsstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 6c485907ba..60c06ca7d0 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -497,7 +497,7 @@ int QWindowsStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QW
{
#ifndef Q_OS_WINCE
NONCLIENTMETRICS ncm;
- ncm.cbSize = sizeof(NONCLIENTMETRICS);
+ ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) + sizeof(LOGFONT);
if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, 0))
ret = qMax(ncm.iScrollHeight, ncm.iScrollWidth);
else