From 01140c6c47ab073ffd35f4534f2222dd38f29127 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 24 Mar 2010 16:15:07 +0100 Subject: 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 --- src/gui/styles/qwindowsstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12