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:
parent
35b86c492e
commit
55b7bc3219
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user