From 670a9c00ef5ee4bbcbaaefa9482e39359180ac4f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 4 Mar 2016 10:39:50 +0100 Subject: Windows XP style: Allow High DPI scaling to draw directly. Previously, the style defaulted to drawing via pixmaps when the device transformation of the QPainter was more complex than TxTranslate. Introduce an enumeration describing the transformation to be able to identify the scaling used by High DPI scaling and allow for direct drawing in that case as well. Add scale factors. Create pixmaps with device pixel ration in drawBackgroundThruNativeBuffer() if High DPI scaling is in effect. Issues: Borders may go missing due to the up-scaling/rounding. Code branches for DrawBackgroundEx==0 are not touched since it is assumed these old versions of Windows do not run in High DPI. Task-number: QTBUG-49374 Change-Id: Idfe1887e4fac3be2843438dc76cb4971a198ab2a Reviewed-by: Alessandro Portale --- src/widgets/styles/qwindowsxpstyle_p_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets/styles/qwindowsxpstyle_p_p.h') diff --git a/src/widgets/styles/qwindowsxpstyle_p_p.h b/src/widgets/styles/qwindowsxpstyle_p_p.h index e1e1369850..c2571b4a79 100644 --- a/src/widgets/styles/qwindowsxpstyle_p_p.h +++ b/src/widgets/styles/qwindowsxpstyle_p_p.h @@ -387,8 +387,8 @@ public: void setTransparency(QWidget *widget, XPThemeData &themeData); bool drawBackground(XPThemeData &themeData); - bool drawBackgroundThruNativeBuffer(XPThemeData &themeData); - bool drawBackgroundDirectly(XPThemeData &themeData); + bool drawBackgroundThruNativeBuffer(XPThemeData &themeData, int aditionalDevicePixelRatio); + bool drawBackgroundDirectly(XPThemeData &themeData, int aditionalDevicePixelRatio); bool hasAlphaChannel(const QRect &rect); bool fixAlphaChannel(const QRect &rect); -- cgit v1.2.3