diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp index e9df7a1e8c..000c27e685 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp @@ -997,7 +997,7 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa #endif img = QImage(bufferPixels, bufferW, bufferH, format); if (hasCorrectionFactor) - img = img.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation); + img = img.scaled(img.size() * correctionFactor, Qt::KeepAspectRatio, Qt::SmoothTransformation); img.setDevicePixelRatio(additionalDevicePixelRatio); } @@ -2293,7 +2293,7 @@ static void populateMdiButtonTheme(const QStyle *proxy, const QWidget *widget, // Calculate an small (max 2), empirical correction factor for scaling up // WP_MDICLOSEBUTTON, WP_MDIRESTOREBUTTON, WP_MDIMINBUTTON, which are too // small on High DPI screens (QTBUG-75927). -qreal mdiButtonCorrectionFactor(XPThemeData &theme, const QPaintDevice *pd = nullptr) +static qreal mdiButtonCorrectionFactor(XPThemeData &theme, const QPaintDevice *pd = nullptr) { const auto dpr = pd ? pd->devicePixelRatio() : qApp->devicePixelRatio(); const QSizeF nativeSize = QSizeF(theme.size()) / dpr;