We've made SourceOver the default compositionMode in QPainter.

This in turn makes the default:
QPainter::fillRect(QRect(...), Qt::transparent); 
a no-op. The commit makes the fillrect actually do what, I bet
it was supposed to be doing. (but i ain't much of a gambler since
i'm not sure what it's supposed to be doin in the first place. at
least now it's doing something "weird" faster)


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=680260
This commit is contained in:
Zack Rusin 2007-06-25 19:20:54 +00:00
parent e285025ba5
commit 0e274e2017

View File

@ -162,7 +162,10 @@ void Icon::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
{
Q_UNUSED(option)
Q_UNUSED(widget)
painter->save();
painter->setCompositionMode(QPainter::CompositionMode_Source);
painter->fillRect(boundingRect(), Qt::transparent);
painter->restore();
#ifdef PROVE_IT_CAN_BE_DONE
if (d->state == Private::HoverState && scene()) {
@ -175,9 +178,7 @@ void Icon::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
p.drawPixmap(image.rect(), *pix, sceneBoundingRect());
}
expblur<16,7>(image, 8);
painter->save();
painter->drawImage(0, 0, image);
painter->restore();
}
}
#endif