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=1090208icc-effect-5.14.5
parent
bb061e1e72
commit
935b40d436
|
@ -174,7 +174,7 @@ namespace Oxygen
|
||||||
glowAnimation().data()->setDuration( configuration_.animationsDuration() );
|
glowAnimation().data()->setDuration( configuration_.animationsDuration() );
|
||||||
titleAnimationData_.data()->setDuration( configuration_.animationsDuration() );
|
titleAnimationData_.data()->setDuration( configuration_.animationsDuration() );
|
||||||
itemData_.animation().data()->setDuration( configuration_.animationsDuration() );
|
itemData_.animation().data()->setDuration( configuration_.animationsDuration() );
|
||||||
itemData_.setAnimationsEnabled( configuration_.useAnimations() );
|
itemData_.setAnimationsEnabled( useAnimations() );
|
||||||
|
|
||||||
// reset title transitions
|
// reset title transitions
|
||||||
titleAnimationData_.data()->reset();
|
titleAnimationData_.data()->reset();
|
||||||
|
|
|
@ -36,8 +36,10 @@
|
||||||
#include "lib/helper.h"
|
#include "lib/helper.h"
|
||||||
|
|
||||||
#include <kcommondecoration.h>
|
#include <kcommondecoration.h>
|
||||||
#include <QBasicTimer>
|
#include <KGlobalSettings>
|
||||||
#include <QTimerEvent>
|
#include <QtCore/QBasicTimer>
|
||||||
|
#include <QtCore/QTimerEvent>
|
||||||
|
|
||||||
|
|
||||||
namespace Oxygen
|
namespace Oxygen
|
||||||
{
|
{
|
||||||
|
@ -76,6 +78,16 @@ namespace Oxygen
|
||||||
virtual bool isMaximized( void ) const
|
virtual bool isMaximized( void ) const
|
||||||
{ return maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); }
|
{ 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
|
//! true if glow is animated
|
||||||
bool glowIsAnimated( void ) const
|
bool glowIsAnimated( void ) const
|
||||||
{ return glowAnimation_.data()->isRunning(); }
|
{ return glowAnimation_.data()->isRunning(); }
|
||||||
|
@ -289,13 +301,13 @@ namespace Oxygen
|
||||||
|
|
||||||
//! return true when activity change are animated
|
//! return true when activity change are animated
|
||||||
bool animateActiveChange( void ) const
|
bool animateActiveChange( void ) const
|
||||||
{ return ( configuration().useAnimations() && !isPreview() ); }
|
{ return ( useAnimations() && !isPreview() ); }
|
||||||
|
|
||||||
//! return true when activity change are animated
|
//! return true when activity change are animated
|
||||||
bool animateTitleChange( void ) const
|
bool animateTitleChange( void ) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
configuration().useAnimations() &&
|
useAnimations() &&
|
||||||
configuration().animateTitleChange() &&
|
configuration().animateTitleChange() &&
|
||||||
!configuration().drawTitleOutline() &&
|
!configuration().drawTitleOutline() &&
|
||||||
!configuration().hideTitleBar() &&
|
!configuration().hideTitleBar() &&
|
||||||
|
|
Loading…
Reference in New Issue