fixed button rendering using QPainterPath, as done for kde2 windeco
svn path=/trunk/KDE/kdebase/workspace/; revision=1017168
This commit is contained in:
parent
bbb66d7a7d
commit
0f9de2a3a8
1 changed files with 9 additions and 2 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue