Fixed glitch between glow pixmap and icon color when animating glow
svn path=/trunk/KDE/kdebase/workspace/; revision=1024491
This commit is contained in:
parent
e679d07b93
commit
45717eeae9
1 changed files with 7 additions and 2 deletions
|
@ -216,14 +216,19 @@ namespace Oxygen
|
||||||
painter.drawPixmap(0, 0, helper_.windecoButton(bt, status_ == Oxygen::Pressed, (21.0*client_.configuration().buttonSize())/22 ) );
|
painter.drawPixmap(0, 0, helper_.windecoButton(bt, status_ == Oxygen::Pressed, (21.0*client_.configuration().buttonSize())/22 ) );
|
||||||
|
|
||||||
// draw glow on hover
|
// 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.save();
|
||||||
painter.setOpacity( ratio );
|
painter.setOpacity( ratio );
|
||||||
painter.drawPixmap(0, 0, helper_.windecoButtonGlow(glow, (21.0*client_.configuration().buttonSize())/22));
|
painter.drawPixmap(0, 0, helper_.windecoButtonGlow(glow, (21.0*client_.configuration().buttonSize())/22));
|
||||||
painter.restore();
|
painter.restore();
|
||||||
|
|
||||||
|
} else if( status_ == Oxygen::Hovered ) {
|
||||||
|
|
||||||
|
painter.drawPixmap(0, 0, helper_.windecoButtonGlow(glow, (21.0*client_.configuration().buttonSize())/22));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw button icon
|
// draw button icon
|
||||||
|
|
Loading…
Reference in a new issue