summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-01-06 12:09:14 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-01-07 06:56:31 (GMT)
commit84658ec4e650b12dcea6f886b530e66a195465cf (patch)
treeb7283e42837539af8f979cbba14da85e729468b2 /src/gui/styles
parente185e5f008f6852bd7a79d74262717c8e377b918 (diff)
downloadQt-84658ec4e650b12dcea6f886b530e66a195465cf.zip
Qt-84658ec4e650b12dcea6f886b530e66a195465cf.tar.gz
Qt-84658ec4e650b12dcea6f886b530e66a195465cf.tar.bz2
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
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qwindowsstyle.cpp4
1 files 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;