From 45717eeae94aeea111d827c8d08eb4b6e6f443d0 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 16 Sep 2009 17:16:55 +0000 Subject: [PATCH] Fixed glitch between glow pixmap and icon color when animating glow svn path=/trunk/KDE/kdebase/workspace/; revision=1024491 --- clients/oxygen/oxygenbutton.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 0b150e05f6..8baaee81fb 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -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