fixed button rendering using QPainterPath, as done for kde2 windeco

svn path=/trunk/KDE/kdebase/workspace/; revision=1017168
This commit is contained in:
Hugo Pereira Da Costa 2009-08-29 20:16:46 +00:00
parent bbb66d7a7d
commit 0f9de2a3a8

View file

@ -862,9 +862,16 @@ void KeramikButton::paintEvent( QPaintEvent * )
deco = NULL; deco = NULL;
} }
p.setPen( Qt::black ); // ### hardcoded color
if (deco) if (deco)
p.drawPixmap( (size-17)/2, (size-17)/2, *deco ); {
QPainterPath path;
path.addRegion( *deco );
QPoint offset( (size-17)/2, (size-17)/2 );
p.translate( offset );
p.setPen( Qt::NoPen );
p.setBrush( Qt::black );
p.drawPath( path );
}
} }