[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdebase/workspace/kwin/clients/oxygen
From: Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date: 2010-02-12 1:16:57
Message-ID: 1265937417.233119.13649.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1088958 by hpereiradacosta:
backport r1088957
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.
M +1 -0 oxygenclient.cpp
M +23 -3 oxygenclientgroupitemdata.cpp
M +11 -0 oxygenclientgroupitemdata.h
--- branches/KDE/4.4/kdebase/workspace/kwin/clients/oxygen/oxygenclient.cpp \
#1088957:1088958 @@ -174,6 +174,7 @@
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();
--- branches/KDE/4.4/kdebase/workspace/kwin/clients/oxygen/oxygenclientgroupitemdata.cpp \
#1088957:1088958 @@ -39,6 +39,8 @@
QObject( parent ),
QList<ClientGroupItemData>(),
client_( *parent ),
+ dirty_( false ),
+ animationsEnabled_( true ),
animation_( new Animation( 150, this ) ),
animationType_( AnimationNone ),
progress_(0),
@@ -157,9 +159,20 @@
targetRect_.setWidth( width );
}
- if( animate ) animation().data()->start();
- else {
+ 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 @@
}
- animation().data()->start();
+ if( animationsEnabled() ) animation().data()->start();
+ else {
+
+ // change progress to maximum
+ progress_ = 1;
+ updateBoundingRects();
+
+ }
}
--- branches/KDE/4.4/kdebase/workspace/kwin/clients/oxygen/oxygenclientgroupitemdata.h \
#1088957:1088958 @@ -121,6 +121,14 @@
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 @@
/* used to trigger update at next paintEvent */
bool dirty_;
+ //! true if animations are enabled
+ bool animationsEnabled_;
+
//! animation
Animation::Pointer animation_;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic