From 76ead449e58d636516e9cec5c5eade7051d0c0b7 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 1 Jun 2010 21:21:15 +0000 Subject: [PATCH] repaint the pixmap over transparency if it doesn't have an alpha cannel svn path=/trunk/KDE/kdelibs/; revision=1133517 --- paintutils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paintutils.cpp b/paintutils.cpp index 6155a9a98..b3be19ada 100644 --- a/paintutils.cpp +++ b/paintutils.cpp @@ -154,7 +154,7 @@ void centerPixmaps(QPixmap &from, QPixmap &to) fromRect.moveCenter(actualRect.center()); toRect.moveCenter(actualRect.center()); - if (from.size() != actualRect.size()) { + if (from.size() != actualRect.size() || !from.hasAlphaChannel()) { QPixmap result(actualRect.size()); result.fill(Qt::transparent); QPainter p(&result); @@ -164,7 +164,7 @@ void centerPixmaps(QPixmap &from, QPixmap &to) from = result; } - if (to.size() != actualRect.size()) { + if (to.size() != actualRect.size() || !to.hasAlphaChannel()) { QPixmap result(actualRect.size()); result.fill(Qt::transparent); QPainter p(&result);