Fixed glitch between glow pixmap and icon color when animating glow

svn path=/trunk/KDE/kdebase/workspace/; revision=1024491
icc-effect-5.14.5
Hugo Pereira Da Costa 2009-09-16 17:16:55 +00:00
parent e679d07b93
commit 45717eeae9
1 changed files with 7 additions and 2 deletions

View File

@ -216,14 +216,19 @@ namespace Oxygen
painter.drawPixmap(0, 0, helper_.windecoButton(bt, status_ == Oxygen::Pressed, (21.0*client_.configuration().buttonSize())/22 ) );
// draw glow on hover
if( status_ == Oxygen::Hovered || timeLine_.state() == OxygenTimeLine::Running )
if( timeLine_.state() == OxygenTimeLine::Running )
{
qreal ratio( qreal( timeLine_.currentIndex() )/qreal( timeLine_.maxIndex() ) );
qreal ratio( qreal( timeLine_.currentIndex() )/qreal( timeLine_.maxIndex() ) );
painter.save();
painter.setOpacity( ratio );
painter.drawPixmap(0, 0, helper_.windecoButtonGlow(glow, (21.0*client_.configuration().buttonSize())/22));
painter.restore();
} else if( status_ == Oxygen::Hovered ) {
painter.drawPixmap(0, 0, helper_.windecoButtonGlow(glow, (21.0*client_.configuration().buttonSize())/22));
}
// draw button icon