summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsxpstyle.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-01-25 12:31:50 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-25 18:00:10 +0100
commitb37969bb5d889961a19220a5026c98ce692e4ca7 (patch)
tree05bd817c62235894f1c482f06f02f51dce3a7077 /src/widgets/styles/qwindowsxpstyle.cpp
parent45690f7567a8b858a46f6519f070f81dea65a362 (diff)
Windows Vista Style: Fix drawing of buttons in message boxes.
Do not use the HDC of the backing store when drawing to an image (as opposed to 4.8, where the HDC of the paint engine was used). This causes 'ghost buttons' to appear in the dialog box at 0,0. Change-Id: I301b66abf4447a65ee144f09655b68efaf18700d Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Diffstat (limited to 'src/widgets/styles/qwindowsxpstyle.cpp')
-rw-r--r--src/widgets/styles/qwindowsxpstyle.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp
index eaeb336a61..c112e62c6c 100644
--- a/src/widgets/styles/qwindowsxpstyle.cpp
+++ b/src/widgets/styles/qwindowsxpstyle.cpp
@@ -665,7 +665,7 @@ bool QWindowsXPStylePrivate::swapAlphaChannel(const QRect &rect, bool allPixels)
- Theme part is flipped (mirrored horizontally)
else use drawBackgroundDirectly().
*/
-void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData)
+void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData, bool forceFallback)
{
if (themeData.rect.isEmpty())
return;
@@ -693,14 +693,13 @@ void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData)
dc = static_cast<HDC>(nativeInterface->nativeResourceForBackingStore("getDC", backingStore ));
}
- bool useFallback = dc == 0
+ const bool useFallback = forceFallback || dc == 0
|| painter->opacity() != 1.0
|| themeData.rotate
|| complexXForm
|| themeData.mirrorVertically
|| (themeData.mirrorHorizontally && pDrawThemeBackgroundEx == 0)
|| translucentToplevel;
-
if (!useFallback)
drawBackgroundDirectly(themeData);
else