repaint the pixmap over transparency if it doesn't have an alpha cannel

svn path=/trunk/KDE/kdelibs/; revision=1133517
This commit is contained in:
Marco Martin 2010-06-01 21:21:15 +00:00
parent bbc72390b9
commit 76ead449e5

View File

@ -154,7 +154,7 @@ void centerPixmaps(QPixmap &from, QPixmap &to)
fromRect.moveCenter(actualRect.center()); fromRect.moveCenter(actualRect.center());
toRect.moveCenter(actualRect.center()); toRect.moveCenter(actualRect.center());
if (from.size() != actualRect.size()) { if (from.size() != actualRect.size() || !from.hasAlphaChannel()) {
QPixmap result(actualRect.size()); QPixmap result(actualRect.size());
result.fill(Qt::transparent); result.fill(Qt::transparent);
QPainter p(&result); QPainter p(&result);
@ -164,7 +164,7 @@ void centerPixmaps(QPixmap &from, QPixmap &to)
from = result; from = result;
} }
if (to.size() != actualRect.size()) { if (to.size() != actualRect.size() || !to.hasAlphaChannel()) {
QPixmap result(actualRect.size()); QPixmap result(actualRect.size());
result.fill(Qt::transparent); result.fill(Qt::transparent);
QPainter p(&result); QPainter p(&result);