From 3aa5fec77b2e1edbcbd1d7735389725076f91cbf Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 14 Sep 2009 08:14:12 +0200 Subject: Fixed groupbox drawing on xp when hitting the fallback code. When swapping the alphachannel we need to make sure we create proper premultiplied pixels. When setting alpha to 0, that means also setting the other pixel values to 0. This bug was made visible by the gl graphics system. Reviewed-by: MariusSO --- src/gui/styles/qwindowsxpstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 5645950..0dc1832 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -586,7 +586,7 @@ bool QWindowsXPStylePrivate::swapAlphaChannel(const QRect &rect, bool allPixels) } register unsigned int alphaValue = (*buffer) & 0xFF000000; if (alphaValue == 0xFF000000) { - *buffer &= 0x00FFFFFF; + *buffer = 0; valueChange = true; } else if (alphaValue == 0) { *buffer |= 0xFF000000; -- cgit v0.12