diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-24 15:15:07 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-24 16:42:52 (GMT) |
commit | 01140c6c47ab073ffd35f4534f2222dd38f29127 (patch) | |
tree | 1d372065ceb578ff89141b9490303c80cb42fec9 /src/gui/styles/qwindowsstyle.cpp | |
parent | 6c8c62f470e31ff2f74e2a5d3ba71d36da5f6d77 (diff) | |
download | Qt-01140c6c47ab073ffd35f4534f2222dd38f29127.zip Qt-01140c6c47ab073ffd35f4534f2222dd38f29127.tar.gz Qt-01140c6c47ab073ffd35f4534f2222dd38f29127.tar.bz2 |
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 6c48590..60c06ca 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 |