fixed button rendering using QPainterPath, as done for kde2 windeco

svn path=/trunk/KDE/kdebase/workspace/; revision=1017178
This commit is contained in:
Hugo Pereira Da Costa 2009-08-29 20:38:43 +00:00
parent 313bc152f2
commit b51ce3fc34

View file

@ -431,8 +431,12 @@ void ModernButton::drawButton(QPainter *p)
p->drawPixmap(0, 0, isDown() ? *iButtonPixDown : *iButtonPix);
}
if(!deco.isNull()){
p->setPen(*buttonFg);
p->drawPixmap(isDown() ? 4 : 3, isDown() ? 5 : 4, deco);
QPainterPath path;
path.addRegion( deco );
p->setBrush(*buttonFg);
p->setPen( Qt::NoPen );
p->translate( isDown() ? QPoint( 4, 5 ):QPoint( 3, 4 ) );
p->drawPath( path );
}
}