From e56b8e1e59b6df7c7abd48b163abe6846849eb7a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 27 Jan 2020 11:04:14 +0100 Subject: QWindowsXPStyle: Fix MDI button size for maximized QMdiSubWindows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The controls as drawn by the UxTheme library are too tiny; add an additional correction factor to QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), allowing to scale the result via the QImage. For the MDI button size, calulcate the factor by comparing the theme size to the subcontrol rectangle. Fixes: QTBUG-75927 Change-Id: Iab0911b51d13f3de0d9278a32cb4598ce709d745 Reviewed-by: Oliver Wolff Reviewed-by: André de la Rocha --- src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h') diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h b/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h index ad7754e3d4..06b37a6e5c 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h @@ -241,8 +241,8 @@ public: bool isTransparent(XPThemeData &themeData); QRegion region(XPThemeData &themeData); - bool drawBackground(XPThemeData &themeData); - bool drawBackgroundThruNativeBuffer(XPThemeData &themeData, qreal aditionalDevicePixelRatio); + bool drawBackground(XPThemeData &themeData, qreal correctionFactor = 1); + bool drawBackgroundThruNativeBuffer(XPThemeData &themeData, qreal aditionalDevicePixelRatio, qreal correctionFactor); bool drawBackgroundDirectly(HDC dc, XPThemeData &themeData, qreal aditionalDevicePixelRatio); bool hasAlphaChannel(const QRect &rect); -- cgit v1.2.3