condition tabbing animations to the 'useAnimation' flag, for consistancy with other animations. begin and final animation states are kept visually unchanged. Only the smooth transition between the two is disabled.
svn path=/trunk/KDE/kdebase/workspace/; revision=1088957icc-effect-5.14.5
parent
c896faa443
commit
fa03ee04a2
|
@ -174,6 +174,7 @@ namespace Oxygen
|
|||
glowAnimation().data()->setDuration( configuration_.animationsDuration() );
|
||||
titleAnimationData_.data()->setDuration( configuration_.animationsDuration() );
|
||||
itemData_.animation().data()->setDuration( configuration_.animationsDuration() );
|
||||
itemData_.setAnimationsEnabled( configuration_.useAnimations() );
|
||||
|
||||
// reset title transitions
|
||||
titleAnimationData_.data()->reset();
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace Oxygen
|
|||
QObject( parent ),
|
||||
QList<ClientGroupItemData>(),
|
||||
client_( *parent ),
|
||||
dirty_( false ),
|
||||
animationsEnabled_( true ),
|
||||
animation_( new Animation( 150, this ) ),
|
||||
animationType_( AnimationNone ),
|
||||
progress_(0),
|
||||
|
@ -157,9 +159,20 @@ namespace Oxygen
|
|||
targetRect_.setWidth( width );
|
||||
}
|
||||
|
||||
if( animate ) animation().data()->start();
|
||||
if( animate )
|
||||
{
|
||||
|
||||
if( animationsEnabled() ) animation().data()->start();
|
||||
else {
|
||||
|
||||
// change progress to maximum
|
||||
progress_ = 1;
|
||||
updateBoundingRects();
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
for( int index = 0; index < count(); index++ )
|
||||
{
|
||||
ClientGroupItemData& item( ClientGroupItemDataList::operator[](index) );
|
||||
|
@ -236,7 +249,14 @@ namespace Oxygen
|
|||
|
||||
}
|
||||
|
||||
animation().data()->start();
|
||||
if( animationsEnabled() ) animation().data()->start();
|
||||
else {
|
||||
|
||||
// change progress to maximum
|
||||
progress_ = 1;
|
||||
updateBoundingRects();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -121,6 +121,14 @@ namespace Oxygen
|
|||
bool isDirty( void ) const
|
||||
{ return dirty_; }
|
||||
|
||||
//! enable animations
|
||||
void setAnimationsEnabled( bool value )
|
||||
{ animationsEnabled_ = value; }
|
||||
|
||||
//! animations enabled
|
||||
bool animationsEnabled( void ) const
|
||||
{ return animationsEnabled_; }
|
||||
|
||||
//! true if being animated
|
||||
bool isAnimated( void ) const
|
||||
{ return animationType_ != AnimationNone; }
|
||||
|
@ -183,6 +191,9 @@ namespace Oxygen
|
|||
/* used to trigger update at next paintEvent */
|
||||
bool dirty_;
|
||||
|
||||
//! true if animations are enabled
|
||||
bool animationsEnabled_;
|
||||
|
||||
//! animation
|
||||
Animation::Pointer animation_;
|
||||
|
||||
|
|
Loading…
Reference in New Issue