From 84658ec4e650b12dcea6f886b530e66a195465cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 6 Jan 2011 13:09:14 +0100 Subject: Fixed bug and performance problem in windowsstyle. QImage::fill(Qt::transparent) pre-4.8 is a bug, also using Format_ARGB32 is very unoptimal compared to Format_ARGB32_Premultiplied. Task-number: QTBUG-16439 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/styles/qwindowsstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 32a6d8d..4144b80 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -1395,8 +1395,8 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, if (!QPixmapCache::find(pixmapName, pixmap)) { int border = size/5; int sqsize = 2*(size/2); - QImage image(sqsize, sqsize, QImage::Format_ARGB32); - image.fill(Qt::transparent); + QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied); + image.fill(0); QPainter imagePainter(&image); QPolygon a; -- cgit v0.12