Use KGlobalSettings::graphicEffectsLevel in conjunction with OxygenConfiguration to
determine if animations should be enabled. This allows to turn off all animations if the "graphical effects" combobox in "systemsettings->appearance->style->fine tunning" is set to either - Low display resolution and low CPU - High display resolution and low CPU BUG: 226668 svn path=/trunk/KDE/kdebase/workspace/; revision=1090208
This commit is contained in:
parent
bb061e1e72
commit
935b40d436
2 changed files with 17 additions and 5 deletions
|
@ -174,7 +174,7 @@ namespace Oxygen
|
|||
glowAnimation().data()->setDuration( configuration_.animationsDuration() );
|
||||
titleAnimationData_.data()->setDuration( configuration_.animationsDuration() );
|
||||
itemData_.animation().data()->setDuration( configuration_.animationsDuration() );
|
||||
itemData_.setAnimationsEnabled( configuration_.useAnimations() );
|
||||
itemData_.setAnimationsEnabled( useAnimations() );
|
||||
|
||||
// reset title transitions
|
||||
titleAnimationData_.data()->reset();
|
||||
|
|
|
@ -36,8 +36,10 @@
|
|||
#include "lib/helper.h"
|
||||
|
||||
#include <kcommondecoration.h>
|
||||
#include <QBasicTimer>
|
||||
#include <QTimerEvent>
|
||||
#include <KGlobalSettings>
|
||||
#include <QtCore/QBasicTimer>
|
||||
#include <QtCore/QTimerEvent>
|
||||
|
||||
|
||||
namespace Oxygen
|
||||
{
|
||||
|
@ -76,6 +78,16 @@ namespace Oxygen
|
|||
virtual bool isMaximized( void ) const
|
||||
{ return maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); }
|
||||
|
||||
|
||||
//! true if animations are used
|
||||
/*! this combines OxygenConfiguration and KGlobalSettings */
|
||||
bool useAnimations( void ) const
|
||||
{
|
||||
return
|
||||
configuration().useAnimations() &&
|
||||
KGlobalSettings::graphicEffectsLevel() >= KGlobalSettings::SimpleAnimationEffects;
|
||||
}
|
||||
|
||||
//! true if glow is animated
|
||||
bool glowIsAnimated( void ) const
|
||||
{ return glowAnimation_.data()->isRunning(); }
|
||||
|
@ -289,13 +301,13 @@ namespace Oxygen
|
|||
|
||||
//! return true when activity change are animated
|
||||
bool animateActiveChange( void ) const
|
||||
{ return ( configuration().useAnimations() && !isPreview() ); }
|
||||
{ return ( useAnimations() && !isPreview() ); }
|
||||
|
||||
//! return true when activity change are animated
|
||||
bool animateTitleChange( void ) const
|
||||
{
|
||||
return
|
||||
configuration().useAnimations() &&
|
||||
useAnimations() &&
|
||||
configuration().animateTitleChange() &&
|
||||
!configuration().drawTitleOutline() &&
|
||||
!configuration().hideTitleBar() &&
|
||||
|
|
Loading…
Reference in a new issue