added necessary options to configure all type of animations individually.
parent
6c235bbe1e
commit
c21122c863
|
@ -117,8 +117,7 @@ namespace Oxygen
|
||||||
|
|
||||||
else if( ui->ui.separatorMode->currentIndex() != configuration.separatorMode() ) modified = true;
|
else if( ui->ui.separatorMode->currentIndex() != configuration.separatorMode() ) modified = true;
|
||||||
else if( ui->ui.titleOutline->isChecked() != configuration.drawTitleOutline() ) modified = true;
|
else if( ui->ui.titleOutline->isChecked() != configuration.drawTitleOutline() ) modified = true;
|
||||||
else if( ui->ui.useAnimations->isChecked() != configuration.useAnimations() ) modified = true;
|
else if( ui->ui.animationsEnabled->isChecked() != configuration.animationsEnabled() ) modified = true;
|
||||||
else if( ui->ui.animateTitleChange->isChecked() != configuration.animateTitleChange() ) modified = true;
|
|
||||||
else if( ui->ui.narrowButtonSpacing->isChecked() != configuration.useNarrowButtonSpacing() ) modified = true;
|
else if( ui->ui.narrowButtonSpacing->isChecked() != configuration.useNarrowButtonSpacing() ) modified = true;
|
||||||
|
|
||||||
// shadow configurations
|
// shadow configurations
|
||||||
|
@ -152,8 +151,7 @@ namespace Oxygen
|
||||||
configuration.setDrawTitleOutline( ui->ui.titleOutline->isChecked() );
|
configuration.setDrawTitleOutline( ui->ui.titleOutline->isChecked() );
|
||||||
configuration.setUseDropShadows( ui->shadowConfigurations[1]->isChecked() );
|
configuration.setUseDropShadows( ui->shadowConfigurations[1]->isChecked() );
|
||||||
configuration.setUseOxygenShadows( ui->shadowConfigurations[0]->isChecked() );
|
configuration.setUseOxygenShadows( ui->shadowConfigurations[0]->isChecked() );
|
||||||
configuration.setUseAnimations( ui->ui.useAnimations->isChecked() );
|
configuration.setAnimationsEnabled( ui->ui.animationsEnabled->isChecked() );
|
||||||
configuration.setAnimateTitleChange( ui->ui.animateTitleChange->isChecked() );
|
|
||||||
configuration.setUseNarrowButtonSpacing( ui->ui.narrowButtonSpacing->isChecked() );
|
configuration.setUseNarrowButtonSpacing( ui->ui.narrowButtonSpacing->isChecked() );
|
||||||
|
|
||||||
// save standard configuration
|
// save standard configuration
|
||||||
|
@ -229,8 +227,7 @@ namespace Oxygen
|
||||||
ui->ui.titleOutline->setChecked( configuration.drawTitleOutline() );
|
ui->ui.titleOutline->setChecked( configuration.drawTitleOutline() );
|
||||||
ui->shadowConfigurations[0]->setChecked( configuration.useOxygenShadows() );
|
ui->shadowConfigurations[0]->setChecked( configuration.useOxygenShadows() );
|
||||||
ui->shadowConfigurations[1]->setChecked( configuration.useDropShadows() );
|
ui->shadowConfigurations[1]->setChecked( configuration.useDropShadows() );
|
||||||
ui->ui.useAnimations->setChecked( configuration.useAnimations() );
|
ui->ui.animationsEnabled->setChecked( configuration.animationsEnabled() );
|
||||||
ui->ui.animateTitleChange->setChecked( configuration.animateTitleChange() );
|
|
||||||
ui->ui.narrowButtonSpacing->setChecked( configuration.useNarrowButtonSpacing() );
|
ui->ui.narrowButtonSpacing->setChecked( configuration.useNarrowButtonSpacing() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,14 +104,12 @@ namespace Oxygen
|
||||||
connect( ui.blendColor, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
connect( ui.blendColor, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||||
connect( ui.sizeGripMode, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
connect( ui.sizeGripMode, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||||
|
|
||||||
connect( ui.useAnimations, SIGNAL(clicked()), SIGNAL(changed()) );
|
connect( ui.animationsEnabled, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||||
connect( ui.animateTitleChange, SIGNAL(clicked()), SIGNAL(changed()) );
|
|
||||||
connect( ui.narrowButtonSpacing, SIGNAL(clicked()), SIGNAL(changed()) );
|
connect( ui.narrowButtonSpacing, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||||
connect( ui.separatorMode, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
connect( ui.separatorMode, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||||
connect( ui.titleOutline, SIGNAL(clicked()), SIGNAL(changed()) );
|
connect( ui.titleOutline, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||||
connect( ui.exceptions, SIGNAL(changed()), SIGNAL(changed()) );
|
connect( ui.exceptions, SIGNAL(changed()), SIGNAL(changed()) );
|
||||||
|
|
||||||
connect( ui.useAnimations, SIGNAL( toggled( bool ) ), ui.animateTitleChange, SLOT( setEnabled( bool ) ) );
|
|
||||||
connect( ui._expertModeButton, SIGNAL( pressed( void ) ), SLOT( toggleExpertModeInternal( void ) ) );
|
connect( ui._expertModeButton, SIGNAL( pressed( void ) ), SLOT( toggleExpertModeInternal( void ) ) );
|
||||||
|
|
||||||
ui._expertModeButton->setIcon( KIcon("configure") );
|
ui._expertModeButton->setIcon( KIcon("configure") );
|
||||||
|
@ -137,7 +135,6 @@ namespace Oxygen
|
||||||
// update button text
|
// update button text
|
||||||
ui._expertModeButton->setText( _expertMode ? i18n( "Hide Advanced Configuration Options" ):i18n( "Show Advanced Configuration Options" ) );
|
ui._expertModeButton->setText( _expertMode ? i18n( "Hide Advanced Configuration Options" ):i18n( "Show Advanced Configuration Options" ) );
|
||||||
|
|
||||||
ui.animateTitleChange->setVisible( _expertMode );
|
|
||||||
ui.narrowButtonSpacing->setVisible( _expertMode );
|
ui.narrowButtonSpacing->setVisible( _expertMode );
|
||||||
|
|
||||||
// size grip mode
|
// size grip mode
|
||||||
|
|
|
@ -92,23 +92,13 @@
|
||||||
<widget class="KComboBox" name="buttonSize"/>
|
<widget class="KComboBox" name="buttonSize"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="3">
|
<item row="3" column="0" colspan="3">
|
||||||
<widget class="QCheckBox" name="useAnimations">
|
<widget class="QCheckBox" name="animationsEnabled">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Enable animations</string>
|
<string>Enable animations</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="4">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="animateTitleChange">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable title transition animations</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|
|
@ -95,8 +95,8 @@ namespace Oxygen
|
||||||
{ return (!_forceInactive) && _client.isActive(); }
|
{ return (!_forceInactive) && _client.isActive(); }
|
||||||
|
|
||||||
//___________________________________________________
|
//___________________________________________________
|
||||||
bool Button::animateButtonHover( void ) const
|
bool Button::buttonAnimationsEnabled( void ) const
|
||||||
{ return _client.useAnimations(); }
|
{ return _client.animationsEnabled() && _client.configuration().buttonAnimationsEnabled(); }
|
||||||
|
|
||||||
//___________________________________________________
|
//___________________________________________________
|
||||||
QSize Button::sizeHint() const
|
QSize Button::sizeHint() const
|
||||||
|
@ -107,7 +107,7 @@ namespace Oxygen
|
||||||
|
|
||||||
//___________________________________________________
|
//___________________________________________________
|
||||||
void Button::reset( unsigned long )
|
void Button::reset( unsigned long )
|
||||||
{ _glowAnimation->setDuration( _client.configuration().animationsDuration() ); }
|
{ _glowAnimation->setDuration( _client.configuration().buttonAnimationsDuration() ); }
|
||||||
|
|
||||||
|
|
||||||
//___________________________________________________
|
//___________________________________________________
|
||||||
|
@ -116,7 +116,7 @@ namespace Oxygen
|
||||||
|
|
||||||
KCommonDecorationButton::enterEvent( event );
|
KCommonDecorationButton::enterEvent( event );
|
||||||
if( _status != Oxygen::Pressed ) _status = Oxygen::Hovered;
|
if( _status != Oxygen::Pressed ) _status = Oxygen::Hovered;
|
||||||
if( animateButtonHover() )
|
if( buttonAnimationsEnabled() )
|
||||||
{
|
{
|
||||||
|
|
||||||
_glowAnimation->setDirection( Animation::Forward );
|
_glowAnimation->setDirection( Animation::Forward );
|
||||||
|
@ -132,7 +132,7 @@ namespace Oxygen
|
||||||
|
|
||||||
KCommonDecorationButton::leaveEvent( event );
|
KCommonDecorationButton::leaveEvent( event );
|
||||||
|
|
||||||
if( _status == Oxygen::Hovered && animateButtonHover() )
|
if( _status == Oxygen::Hovered && buttonAnimationsEnabled() )
|
||||||
{
|
{
|
||||||
_glowAnimation->setDirection( Animation::Backward );
|
_glowAnimation->setDirection( Animation::Backward );
|
||||||
if( !isAnimated() ) _glowAnimation->start();
|
if( !isAnimated() ) _glowAnimation->start();
|
||||||
|
|
|
@ -149,7 +149,7 @@ namespace Oxygen
|
||||||
bool isActive( void ) const;
|
bool isActive( void ) const;
|
||||||
|
|
||||||
//! true if buttons hover are animated
|
//! true if buttons hover are animated
|
||||||
bool animateButtonHover( void ) const;
|
bool buttonAnimationsEnabled( void ) const;
|
||||||
|
|
||||||
//!@name button properties
|
//!@name button properties
|
||||||
//@{
|
//@{
|
||||||
|
|
|
@ -142,11 +142,15 @@ namespace Oxygen
|
||||||
|
|
||||||
_configuration = _factory->configuration( *this );
|
_configuration = _factory->configuration( *this );
|
||||||
|
|
||||||
// animations duration
|
// glow animations
|
||||||
_glowAnimation->setDuration( configuration().animationsDuration() );
|
_glowAnimation->setDuration( configuration().shadowAnimationsDuration() );
|
||||||
_titleAnimationData->setDuration( configuration().animationsDuration() );
|
|
||||||
_itemData.animation().data()->setDuration( configuration().animationsDuration() );
|
// title transitions
|
||||||
_itemData.setAnimationsEnabled( useAnimations() );
|
_titleAnimationData->setDuration( configuration().titleAnimationsDuration() );
|
||||||
|
|
||||||
|
// tabs
|
||||||
|
_itemData.setAnimationsEnabled( animationsEnabled() && configuration().tabAnimationsEnabled() );
|
||||||
|
_itemData.animation().data()->setDuration( configuration().tabAnimationsDuration() );
|
||||||
|
|
||||||
// reset title transitions
|
// reset title transitions
|
||||||
_titleAnimationData->reset();
|
_titleAnimationData->reset();
|
||||||
|
@ -1193,7 +1197,7 @@ namespace Oxygen
|
||||||
_itemData.setDirty( true );
|
_itemData.setDirty( true );
|
||||||
|
|
||||||
// reset animation
|
// reset animation
|
||||||
if( animateActiveChange() )
|
if( shadowAnimationsEnabled() )
|
||||||
{
|
{
|
||||||
_glowAnimation->setDirection( isActive() ? Animation::Forward : Animation::Backward );
|
_glowAnimation->setDirection( isActive() ? Animation::Forward : Animation::Backward );
|
||||||
if(!glowIsAnimated()) { _glowAnimation->start(); }
|
if(!glowIsAnimated()) { _glowAnimation->start(); }
|
||||||
|
@ -1230,7 +1234,7 @@ namespace Oxygen
|
||||||
|
|
||||||
KCommonDecorationUnstable::captionChange();
|
KCommonDecorationUnstable::captionChange();
|
||||||
_itemData.setDirty( true );
|
_itemData.setDirty( true );
|
||||||
if( animateTitleChange() )
|
if( titleAnimationsEnabled() )
|
||||||
{ _titleAnimationData->setDirty( true ); }
|
{ _titleAnimationData->setDirty( true ); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,10 +79,9 @@ 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
|
//! true if animations are used
|
||||||
bool useAnimations( void ) const
|
bool animationsEnabled( void ) const
|
||||||
{ return configuration().useAnimations(); }
|
{ return configuration().animationsEnabled(); }
|
||||||
|
|
||||||
//! true if glow is animated
|
//! true if glow is animated
|
||||||
bool glowIsAnimated( void ) const
|
bool glowIsAnimated( void ) const
|
||||||
|
@ -341,15 +340,15 @@ namespace Oxygen
|
||||||
QPixmap itemDragPixmap( int, const QRect& );
|
QPixmap itemDragPixmap( int, const QRect& );
|
||||||
|
|
||||||
//! return true when activity change are animated
|
//! return true when activity change are animated
|
||||||
bool animateActiveChange( void ) const
|
bool shadowAnimationsEnabled( void ) const
|
||||||
{ return ( useAnimations() && !isPreview() ); }
|
{ return ( animationsEnabled() && configuration().shadowAnimationsEnabled() && !isPreview() ); }
|
||||||
|
|
||||||
//! return true when activity change are animated
|
//! return true when activity change are animated
|
||||||
bool animateTitleChange( void ) const
|
bool titleAnimationsEnabled( void ) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
useAnimations() &&
|
animationsEnabled() &&
|
||||||
configuration().animateTitleChange() &&
|
configuration().titleAnimationsEnabled() &&
|
||||||
!configuration().drawTitleOutline() &&
|
!configuration().drawTitleOutline() &&
|
||||||
!hideTitleBar() &&
|
!hideTitleBar() &&
|
||||||
!isPreview();
|
!isPreview();
|
||||||
|
|
|
@ -47,10 +47,16 @@ namespace Oxygen
|
||||||
_hideTitleBar( false ),
|
_hideTitleBar( false ),
|
||||||
_useDropShadows( true ),
|
_useDropShadows( true ),
|
||||||
_useOxygenShadows( true ),
|
_useOxygenShadows( true ),
|
||||||
_useAnimations( true ),
|
_useNarrowButtonSpacing( false ),
|
||||||
_animateTitleChange( true ),
|
_animationsEnabled( true ),
|
||||||
_animationsDuration( 150 ),
|
_buttonAnimationsEnabled( true ),
|
||||||
_useNarrowButtonSpacing( false )
|
_titleAnimationsEnabled( true ),
|
||||||
|
_shadowAnimationsEnabled( true ),
|
||||||
|
_tabAnimationsEnabled( true ),
|
||||||
|
_buttonAnimationsDuration( 150 ),
|
||||||
|
_titleAnimationsDuration( 150 ),
|
||||||
|
_shadowAnimationsDuration( 150 ),
|
||||||
|
_tabAnimationsDuration( 150 )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//__________________________________________________
|
//__________________________________________________
|
||||||
|
@ -121,26 +127,49 @@ namespace Oxygen
|
||||||
OxygenConfig::USE_OXYGEN_SHADOWS,
|
OxygenConfig::USE_OXYGEN_SHADOWS,
|
||||||
defaultConfiguration.useOxygenShadows() ) );
|
defaultConfiguration.useOxygenShadows() ) );
|
||||||
|
|
||||||
// animations
|
|
||||||
setUseAnimations( group.readEntry(
|
|
||||||
OxygenConfig::USE_ANIMATIONS,
|
|
||||||
defaultConfiguration.useAnimations() ) );
|
|
||||||
|
|
||||||
// animations
|
|
||||||
setAnimateTitleChange( group.readEntry(
|
|
||||||
OxygenConfig::ANIMATE_TITLE_CHANGE,
|
|
||||||
defaultConfiguration.animateTitleChange() ) );
|
|
||||||
|
|
||||||
// animations
|
|
||||||
setAnimationsDuration( group.readEntry(
|
|
||||||
OxygenConfig::ANIMATIONS_DURATION,
|
|
||||||
defaultConfiguration.animationsDuration() ) );
|
|
||||||
|
|
||||||
// buttonSpacing
|
// buttonSpacing
|
||||||
setUseNarrowButtonSpacing( group.readEntry(
|
setUseNarrowButtonSpacing( group.readEntry(
|
||||||
OxygenConfig::NARROW_BUTTON_SPACING,
|
OxygenConfig::NARROW_BUTTON_SPACING,
|
||||||
defaultConfiguration.useNarrowButtonSpacing() ) );
|
defaultConfiguration.useNarrowButtonSpacing() ) );
|
||||||
|
|
||||||
|
// animations
|
||||||
|
setAnimationsEnabled( group.readEntry(
|
||||||
|
OxygenConfig::ANIMATIONS_ENABLED,
|
||||||
|
defaultConfiguration.animationsEnabled() ) );
|
||||||
|
|
||||||
|
setButtonAnimationsEnabled( group.readEntry(
|
||||||
|
OxygenConfig::BUTTON_ANIMATIONS_ENABLED,
|
||||||
|
defaultConfiguration.buttonAnimationsEnabled() ) );
|
||||||
|
|
||||||
|
setTitleAnimationsEnabled( group.readEntry(
|
||||||
|
OxygenConfig::TITLE_ANIMATIONS_ENABLED,
|
||||||
|
defaultConfiguration.titleAnimationsEnabled() ) );
|
||||||
|
|
||||||
|
setShadowAnimationsEnabled( group.readEntry(
|
||||||
|
OxygenConfig::SHADOW_ANIMATIONS_ENABLED,
|
||||||
|
defaultConfiguration.shadowAnimationsEnabled() ) );
|
||||||
|
|
||||||
|
setTabAnimationsEnabled( group.readEntry(
|
||||||
|
OxygenConfig::TAB_ANIMATIONS_ENABLED,
|
||||||
|
defaultConfiguration.tabAnimationsEnabled() ) );
|
||||||
|
|
||||||
|
// animations duration
|
||||||
|
setButtonAnimationsDuration( group.readEntry(
|
||||||
|
OxygenConfig::BUTTON_ANIMATIONS_DURATION,
|
||||||
|
defaultConfiguration.buttonAnimationsDuration() ) );
|
||||||
|
|
||||||
|
setTitleAnimationsDuration( group.readEntry(
|
||||||
|
OxygenConfig::TITLE_ANIMATIONS_DURATION,
|
||||||
|
defaultConfiguration.titleAnimationsDuration() ) );
|
||||||
|
|
||||||
|
setShadowAnimationsDuration( group.readEntry(
|
||||||
|
OxygenConfig::SHADOW_ANIMATIONS_DURATION,
|
||||||
|
defaultConfiguration.shadowAnimationsDuration() ) );
|
||||||
|
|
||||||
|
setTabAnimationsDuration( group.readEntry(
|
||||||
|
OxygenConfig::TAB_ANIMATIONS_DURATION,
|
||||||
|
defaultConfiguration.tabAnimationsDuration() ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//__________________________________________________
|
//__________________________________________________
|
||||||
|
@ -179,11 +208,21 @@ namespace Oxygen
|
||||||
if( hideTitleBar() != defaultConfiguration.hideTitleBar() ) group.writeEntry( OxygenConfig::HIDE_TITLEBAR, hideTitleBar() );
|
if( hideTitleBar() != defaultConfiguration.hideTitleBar() ) group.writeEntry( OxygenConfig::HIDE_TITLEBAR, hideTitleBar() );
|
||||||
if( useDropShadows() != defaultConfiguration.useDropShadows() ) group.writeEntry( OxygenConfig::USE_DROP_SHADOWS, useDropShadows() );
|
if( useDropShadows() != defaultConfiguration.useDropShadows() ) group.writeEntry( OxygenConfig::USE_DROP_SHADOWS, useDropShadows() );
|
||||||
if( useOxygenShadows() != defaultConfiguration.useOxygenShadows() ) group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() );
|
if( useOxygenShadows() != defaultConfiguration.useOxygenShadows() ) group.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, useOxygenShadows() );
|
||||||
if( useAnimations() != defaultConfiguration.useAnimations() ) group.writeEntry( OxygenConfig::USE_ANIMATIONS, useAnimations() );
|
|
||||||
if( animateTitleChange() != defaultConfiguration.animateTitleChange() ) group.writeEntry( OxygenConfig::ANIMATE_TITLE_CHANGE, animateTitleChange() );
|
|
||||||
if( animationsDuration() != defaultConfiguration.animationsDuration() ) group.writeEntry( OxygenConfig::ANIMATIONS_DURATION, animationsDuration() );
|
|
||||||
if( useNarrowButtonSpacing() != defaultConfiguration.useNarrowButtonSpacing() ) group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
|
if( useNarrowButtonSpacing() != defaultConfiguration.useNarrowButtonSpacing() ) group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
|
||||||
|
|
||||||
|
// animations
|
||||||
|
if( animationsEnabled() != defaultConfiguration.animationsEnabled() ) group.writeEntry( OxygenConfig::ANIMATIONS_ENABLED, animationsEnabled() );
|
||||||
|
if( buttonAnimationsEnabled() != defaultConfiguration.buttonAnimationsEnabled() ) group.writeEntry( OxygenConfig::BUTTON_ANIMATIONS_ENABLED, buttonAnimationsEnabled() );
|
||||||
|
if( titleAnimationsEnabled() != defaultConfiguration.titleAnimationsEnabled() ) group.writeEntry( OxygenConfig::TITLE_ANIMATIONS_ENABLED, titleAnimationsEnabled() );
|
||||||
|
if( shadowAnimationsEnabled() != defaultConfiguration.shadowAnimationsEnabled() ) group.writeEntry( OxygenConfig::SHADOW_ANIMATIONS_ENABLED, shadowAnimationsEnabled() );
|
||||||
|
if( tabAnimationsEnabled() != defaultConfiguration.tabAnimationsEnabled() ) group.writeEntry( OxygenConfig::TAB_ANIMATIONS_ENABLED, tabAnimationsEnabled() );
|
||||||
|
|
||||||
|
// animations duration
|
||||||
|
if( buttonAnimationsDuration() != defaultConfiguration.buttonAnimationsDuration() ) group.writeEntry( OxygenConfig::BUTTON_ANIMATIONS_DURATION, buttonAnimationsDuration() );
|
||||||
|
if( titleAnimationsDuration() != defaultConfiguration.titleAnimationsDuration() ) group.writeEntry( OxygenConfig::TITLE_ANIMATIONS_DURATION, titleAnimationsDuration() );
|
||||||
|
if( shadowAnimationsDuration() != defaultConfiguration.shadowAnimationsDuration() ) group.writeEntry( OxygenConfig::SHADOW_ANIMATIONS_DURATION, shadowAnimationsDuration() );
|
||||||
|
if( tabAnimationsDuration() != defaultConfiguration.tabAnimationsDuration() ) group.writeEntry( OxygenConfig::TAB_ANIMATIONS_DURATION, tabAnimationsDuration() );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//__________________________________________________
|
//__________________________________________________
|
||||||
|
@ -362,10 +401,16 @@ namespace Oxygen
|
||||||
hideTitleBar() == other.hideTitleBar() &&
|
hideTitleBar() == other.hideTitleBar() &&
|
||||||
useDropShadows() == other.useDropShadows() &&
|
useDropShadows() == other.useDropShadows() &&
|
||||||
useOxygenShadows() == other.useOxygenShadows() &&
|
useOxygenShadows() == other.useOxygenShadows() &&
|
||||||
useAnimations() == other.useAnimations() &&
|
useNarrowButtonSpacing() == other.useNarrowButtonSpacing() &&
|
||||||
animateTitleChange() == other.animateTitleChange() &&
|
animationsEnabled() == other.animationsEnabled() &&
|
||||||
animationsDuration() == other.animationsDuration() &&
|
buttonAnimationsEnabled() == other.buttonAnimationsEnabled() &&
|
||||||
useNarrowButtonSpacing() == other.useNarrowButtonSpacing();
|
titleAnimationsEnabled() == other.titleAnimationsEnabled() &&
|
||||||
|
shadowAnimationsEnabled() == other.shadowAnimationsEnabled() &&
|
||||||
|
tabAnimationsEnabled() == other.tabAnimationsEnabled() &&
|
||||||
|
buttonAnimationsDuration() == other.buttonAnimationsDuration() &&
|
||||||
|
titleAnimationsDuration() == other.titleAnimationsDuration() &&
|
||||||
|
shadowAnimationsDuration() == other.shadowAnimationsDuration() &&
|
||||||
|
tabAnimationsDuration() == other.tabAnimationsDuration();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,25 @@ namespace OxygenConfig
|
||||||
static const QString BLEND_COLOR = "BlendColor";
|
static const QString BLEND_COLOR = "BlendColor";
|
||||||
static const QString SIZE_GRIP_MODE = "SizeGripMode";
|
static const QString SIZE_GRIP_MODE = "SizeGripMode";
|
||||||
static const QString HIDE_TITLEBAR = "HideTitleBar";
|
static const QString HIDE_TITLEBAR = "HideTitleBar";
|
||||||
static const QString USE_ANIMATIONS = "UseAnimations";
|
static const QString ANIMATIONS_ENABLED = "AnimationsEnabled";
|
||||||
static const QString ANIMATE_TITLE_CHANGE = "AnimateTitleChange";
|
|
||||||
static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing";
|
static const QString NARROW_BUTTON_SPACING = "UseNarrowButtonSpacing";
|
||||||
|
|
||||||
|
//!@name animation flags
|
||||||
|
//@{
|
||||||
|
static const QString BUTTON_ANIMATIONS_ENABLED = "ButtonAnimationsEnabled";
|
||||||
|
static const QString TITLE_ANIMATIONS_ENABLED = "TitleAnimationsEnabled";
|
||||||
|
static const QString SHADOW_ANIMATIONS_ENABLED = "ShadowAnimationsEnabled";
|
||||||
|
static const QString TAB_ANIMATIONS_ENABLED = "TabAnimationsEnabled";
|
||||||
|
//@}
|
||||||
|
|
||||||
|
//!@name animations duration
|
||||||
|
//@{
|
||||||
|
static const QString BUTTON_ANIMATIONS_DURATION = "ButtonAnimationsDuration";
|
||||||
|
static const QString TITLE_ANIMATIONS_DURATION = "TitleAnimationsDuration";
|
||||||
|
static const QString SHADOW_ANIMATIONS_DURATION = "ShadowAnimationsDuration";
|
||||||
|
static const QString TAB_ANIMATIONS_DURATION = "TabAnimationsDuration";
|
||||||
|
//@}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Oxygen
|
namespace Oxygen
|
||||||
|
@ -284,29 +300,82 @@ namespace Oxygen
|
||||||
virtual void setUseOxygenShadows( bool value )
|
virtual void setUseOxygenShadows( bool value )
|
||||||
{ _useOxygenShadows = value; }
|
{ _useOxygenShadows = value; }
|
||||||
|
|
||||||
//! animations
|
//!@name animations
|
||||||
virtual bool useAnimations( void ) const
|
//@{
|
||||||
{ return _useAnimations; }
|
|
||||||
|
|
||||||
//! animations
|
//! global flag
|
||||||
virtual void setUseAnimations( bool value )
|
virtual bool animationsEnabled( void ) const
|
||||||
{ _useAnimations = value; }
|
{ return _animationsEnabled; }
|
||||||
|
|
||||||
//! animations
|
//! global flag
|
||||||
virtual bool animateTitleChange( void ) const
|
virtual void setAnimationsEnabled( bool value )
|
||||||
{ return _animateTitleChange; }
|
{ _animationsEnabled = value; }
|
||||||
|
|
||||||
//! animations
|
//! buttons
|
||||||
virtual void setAnimateTitleChange( bool value )
|
virtual bool buttonAnimationsEnabled( void ) const
|
||||||
{ _animateTitleChange = value; }
|
{ return _buttonAnimationsEnabled; }
|
||||||
|
|
||||||
//! animations
|
//! buttons
|
||||||
virtual int animationsDuration( void ) const
|
virtual void setButtonAnimationsEnabled( bool value )
|
||||||
{ return _animationsDuration; }
|
{ _buttonAnimationsEnabled = value; }
|
||||||
|
|
||||||
//! animations
|
//! buttons
|
||||||
virtual void setAnimationsDuration( int value )
|
virtual int buttonAnimationsDuration( void ) const
|
||||||
{ _animationsDuration = value; }
|
{ return _buttonAnimationsDuration; }
|
||||||
|
|
||||||
|
//! buttons
|
||||||
|
virtual void setButtonAnimationsDuration( int value )
|
||||||
|
{ _buttonAnimationsDuration = value; }
|
||||||
|
|
||||||
|
//! titles
|
||||||
|
virtual bool titleAnimationsEnabled( void ) const
|
||||||
|
{ return _titleAnimationsEnabled; }
|
||||||
|
|
||||||
|
//! title
|
||||||
|
virtual void setTitleAnimationsEnabled( bool value )
|
||||||
|
{ _titleAnimationsEnabled = value; }
|
||||||
|
|
||||||
|
//! title
|
||||||
|
virtual int titleAnimationsDuration( void ) const
|
||||||
|
{ return _titleAnimationsDuration; }
|
||||||
|
|
||||||
|
//! title
|
||||||
|
virtual void setTitleAnimationsDuration( int value )
|
||||||
|
{ _titleAnimationsDuration = value; }
|
||||||
|
|
||||||
|
//! shadows
|
||||||
|
virtual bool shadowAnimationsEnabled( void ) const
|
||||||
|
{ return _shadowAnimationsEnabled; }
|
||||||
|
|
||||||
|
//! shadows
|
||||||
|
virtual void setShadowAnimationsEnabled( bool value )
|
||||||
|
{ _shadowAnimationsEnabled = value; }
|
||||||
|
|
||||||
|
//! shadows
|
||||||
|
virtual int shadowAnimationsDuration( void ) const
|
||||||
|
{ return _shadowAnimationsDuration; }
|
||||||
|
|
||||||
|
//! shadows
|
||||||
|
virtual void setShadowAnimationsDuration( int value )
|
||||||
|
{ _shadowAnimationsDuration = value; }
|
||||||
|
|
||||||
|
//! tabs
|
||||||
|
virtual bool tabAnimationsEnabled( void ) const
|
||||||
|
{ return _tabAnimationsEnabled; }
|
||||||
|
|
||||||
|
//! tabs
|
||||||
|
virtual void setTabAnimationsEnabled( bool value )
|
||||||
|
{ _tabAnimationsEnabled = value; }
|
||||||
|
|
||||||
|
//! tabs
|
||||||
|
virtual int tabAnimationsDuration( void ) const
|
||||||
|
{ return _tabAnimationsDuration; }
|
||||||
|
|
||||||
|
//! tabs
|
||||||
|
virtual void setTabAnimationsDuration( int value )
|
||||||
|
{ _tabAnimationsDuration = value; }
|
||||||
|
|
||||||
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -343,18 +412,26 @@ namespace Oxygen
|
||||||
//! oxygen shadows
|
//! oxygen shadows
|
||||||
bool _useOxygenShadows;
|
bool _useOxygenShadows;
|
||||||
|
|
||||||
//! animations
|
|
||||||
bool _useAnimations;
|
|
||||||
|
|
||||||
//! animations
|
|
||||||
bool _animateTitleChange;
|
|
||||||
|
|
||||||
//! animations
|
|
||||||
int _animationsDuration;
|
|
||||||
|
|
||||||
//! narrow button spacing
|
//! narrow button spacing
|
||||||
bool _useNarrowButtonSpacing;
|
bool _useNarrowButtonSpacing;
|
||||||
|
|
||||||
|
//!@name animation flags
|
||||||
|
//@{
|
||||||
|
bool _animationsEnabled;
|
||||||
|
bool _buttonAnimationsEnabled;
|
||||||
|
bool _titleAnimationsEnabled;
|
||||||
|
bool _shadowAnimationsEnabled;
|
||||||
|
bool _tabAnimationsEnabled;
|
||||||
|
//@}
|
||||||
|
|
||||||
|
//!@name animation durations
|
||||||
|
//@{
|
||||||
|
int _buttonAnimationsDuration;
|
||||||
|
int _titleAnimationsDuration;
|
||||||
|
int _shadowAnimationsDuration;
|
||||||
|
int _tabAnimationsDuration;
|
||||||
|
//@}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue