fixed button rendering using QPainterPath, as done for kde2 windeco

svn path=/trunk/KDE/kdebase/workspace/; revision=1017168
icc-effect-5.14.5
Hugo Pereira Da Costa 2009-08-29 20:16:46 +00:00
parent bbb66d7a7d
commit 0f9de2a3a8
1 changed files with 9 additions and 2 deletions

View File

@ -862,9 +862,16 @@ void KeramikButton::paintEvent( QPaintEvent * )
deco = NULL;
}
p.setPen( Qt::black ); // ### hardcoded color
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 );
}
}