Use pix.fill(Qt::transparent) to initialize the button pixmap to fully transparent.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678647
This commit is contained in:
Fredrik Höglund 2007-06-21 21:54:42 +00:00
parent 35b86c492e
commit 55b7bc3219

View File

@ -375,16 +375,10 @@ void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QPixmap Icon::buttonPixmap()
{
//TODO this is just full of assumptions such as sizes and icon names. ugh!
QPixmap alpha(26, 26);
{
QPainter painter(&alpha);
painter.fillRect(alpha.rect(), Qt::black);
}
QPixmap pix(26, 26);
pix.setAlphaChannel(alpha);
pix.fill(Qt::transparent);
QPainter painter(&pix);
painter.fillRect(pix.rect(), Qt::transparent);
QString element;
if (d->svgElements & Private::SvgMinibutton) {