From f98c1f875c4dd5c4b27d898e50ef6e73bd8a759d Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 6 Jan 2010 01:42:38 +0000 Subject: [PATCH] added dedicated option to enable/disable window title change animation, and disabled it by default. It can be reenabled by adding "AnimateTitleChange=true" in oxygenrc under [Windeco]. svn path=/trunk/KDE/kdebase/workspace/; revision=1070564 --- clients/oxygen/oxygenclient.h | 1 + clients/oxygen/oxygenconfiguration.cpp | 8 ++++++++ clients/oxygen/oxygenconfiguration.h | 12 ++++++++++++ 3 files changed, 21 insertions(+) diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index e07e1f68fd..7636392784 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -296,6 +296,7 @@ namespace Oxygen { return configuration().useAnimations() && + configuration().animateTitleChange() && !configuration().drawTitleOutline() && !configuration().hideTitleBar() && !isPreview(); diff --git a/clients/oxygen/oxygenconfiguration.cpp b/clients/oxygen/oxygenconfiguration.cpp index 70027dbd94..0e0a2f61d4 100644 --- a/clients/oxygen/oxygenconfiguration.cpp +++ b/clients/oxygen/oxygenconfiguration.cpp @@ -42,6 +42,7 @@ namespace Oxygen hideTitleBar_( false ), useOxygenShadows_( true ), useAnimations_( true ), + animateTitleChange_( false ), animationsDuration_( 150 ), tabsEnabled_( true ), useNarrowButtonSpacing_( false ) @@ -104,6 +105,11 @@ namespace Oxygen OxygenConfig::USE_ANIMATIONS, defaultConfiguration.useAnimations() ) ); + // animations + setAnimateTitleChange( group.readEntry( + OxygenConfig::ANIMATE_TITLE_CHANGE, + defaultConfiguration.animateTitleChange() ) ); + // animations setAnimationsDuration( group.readEntry( OxygenConfig::ANIMATIONS_DURATION, @@ -136,6 +142,7 @@ namespace Oxygen group.writeEntry( OxygenConfig::HIDE_TITLEBAR, hideTitleBar() ); group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() ); group.writeEntry( OxygenConfig::USE_ANIMATIONS, useAnimations() ); + group.writeEntry( OxygenConfig::ANIMATE_TITLE_CHANGE, animateTitleChange() ); group.writeEntry( OxygenConfig::ANIMATIONS_DURATION, animationsDuration() ); group.writeEntry( OxygenConfig::TABS_ENABLED, tabsEnabled() ); group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() ); @@ -306,6 +313,7 @@ namespace Oxygen hideTitleBar() == other.hideTitleBar() && useOxygenShadows() == other.useOxygenShadows() && useAnimations() == other.useAnimations() && + animateTitleChange() == other.animateTitleChange() && animationsDuration() == other.animationsDuration() && tabsEnabled() == other.tabsEnabled() && useNarrowButtonSpacing() == other.useNarrowButtonSpacing(); diff --git a/clients/oxygen/oxygenconfiguration.h b/clients/oxygen/oxygenconfiguration.h index 892177b919..bebbc4b8c7 100644 --- a/clients/oxygen/oxygenconfiguration.h +++ b/clients/oxygen/oxygenconfiguration.h @@ -41,6 +41,7 @@ namespace OxygenConfig static const QString USE_OXYGEN_SHADOWS = "UseOxygenShadows"; static const QString HIDE_TITLEBAR = "HideTitleBar"; static const QString USE_ANIMATIONS = "UseAnimations"; + static const QString ANIMATE_TITLE_CHANGE = "AnimateTitleChange"; static const QString ANIMATIONS_DURATION = "AnimationsDuration"; static const QString TABS_ENABLED = "TabsEnabled"; static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing"; @@ -258,6 +259,14 @@ namespace Oxygen virtual void setUseAnimations( bool value ) { useAnimations_ = value; } + //! animations + virtual bool animateTitleChange( void ) const + { return animateTitleChange_; } + + //! animations + virtual void setAnimateTitleChange( bool value ) + { animateTitleChange_ = value; } + //! animations virtual int animationsDuration( void ) const { return animationsDuration_; } @@ -306,6 +315,9 @@ namespace Oxygen //! animations bool useAnimations_; + //! animations + bool animateTitleChange_; + //! animations int animationsDuration_;