diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-24 16:15:07 +0100 |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-24 17:42:52 +0100 |
commit | 01140c6c47ab073ffd35f4534f2222dd38f29127 (patch) | |
tree | 1d372065ceb578ff89141b9490303c80cb42fec9 /src/gui/styles/qwindowsstyle.cpp | |
parent | 6c8c62f470e31ff2f74e2a5d3ba71d36da5f6d77 (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.cpp | 2 |
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 |