fixed animation glitch when leaving button while pressed
svn path=/trunk/KDE/kdebase/workspace/; revision=1024652
This commit is contained in:
parent
45f5f00f9f
commit
1495f281c2
1 changed files with 9 additions and 6 deletions
|
@ -125,16 +125,19 @@ namespace Oxygen
|
|||
void OxygenButton::leaveEvent(QEvent *e)
|
||||
{
|
||||
KCommonDecorationButton::leaveEvent(e);
|
||||
status_ = Oxygen::Normal;
|
||||
|
||||
if( timeLine_.state() == QTimeLine::NotRunning )
|
||||
if( status_ != Oxygen::Pressed )
|
||||
{
|
||||
timeLine_.setDirection( QTimeLine::Backward );
|
||||
timeLine_.start();
|
||||
} else if( timeLine_.direction() == QTimeLine::Forward ) {
|
||||
timeLine_.toggleDirection();
|
||||
if( timeLine_.state() == QTimeLine::NotRunning )
|
||||
{
|
||||
timeLine_.setDirection( QTimeLine::Backward );
|
||||
timeLine_.start();
|
||||
} else if( timeLine_.direction() == QTimeLine::Forward ) {
|
||||
timeLine_.toggleDirection();
|
||||
}
|
||||
}
|
||||
|
||||
status_ = Oxygen::Normal;
|
||||
update();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue