removed "shadowMode" option, since it has been obsoleted by kwin's new shadow system.
This commit is contained in:
parent
32adc59e4b
commit
c5766a5e3a
8 changed files with 17 additions and 122 deletions
|
@ -115,7 +115,6 @@ namespace Oxygen
|
|||
else if( ui->ui.blendColor->currentIndex() != ui->ui.blendColor->findText( configuration.blendColorName( true ) ) ) modified = true;
|
||||
else if( ui->ui.frameBorder->currentIndex() != ui->ui.frameBorder->findText( configuration.frameBorderName( true ) ) ) modified = true;
|
||||
else if( ui->ui.sizeGripMode->currentIndex() != ui->ui.sizeGripMode->findText( configuration.sizeGripModeName( true ) ) ) modified = true;
|
||||
else if( ui->ui.shadowMode->currentIndex() != ui->ui.shadowMode->findText( configuration.shadowModeName( true ) ) ) modified = true;
|
||||
else if( ui->ui.shadowCacheMode->currentIndex() != ui->ui.shadowCacheMode->findText( configuration.shadowCacheModeName( true ) ) ) modified = true;
|
||||
|
||||
else if( ui->ui.separatorMode->currentIndex() != configuration.separatorMode() ) modified = true;
|
||||
|
@ -153,7 +152,6 @@ namespace Oxygen
|
|||
configuration.setFrameBorder( Configuration::frameBorder( ui->ui.frameBorder->currentText(), true ) );
|
||||
configuration.setSizeGripMode( Configuration::sizeGripMode( ui->ui.sizeGripMode->currentText(), true ) );
|
||||
configuration.setShadowCacheMode( Configuration::shadowCacheMode( ui->ui.shadowCacheMode->currentText(), true ) );
|
||||
configuration.setShadowMode( Configuration::shadowMode( ui->ui.shadowMode->currentText(), true ) );
|
||||
configuration.setSeparatorMode( (Oxygen::Configuration::SeparatorMode) ui->ui.separatorMode->currentIndex() );
|
||||
configuration.setDrawTitleOutline( ui->ui.titleOutline->isChecked() );
|
||||
configuration.setUseDropShadows( ui->shadowConfigurations[1]->isChecked() );
|
||||
|
@ -241,7 +239,6 @@ namespace Oxygen
|
|||
ui->ui.useAnimations->setChecked( configuration.useAnimations() );
|
||||
ui->ui.animateTitleChange->setChecked( configuration.animateTitleChange() );
|
||||
ui->ui.narrowButtonSpacing->setChecked( configuration.useNarrowButtonSpacing() );
|
||||
ui->ui.shadowMode->setCurrentIndex( ui->ui.shadowMode->findText( configuration.shadowModeName( true ) ) );
|
||||
ui->ui.shadowCacheMode->setCurrentIndex( ui->ui.shadowCacheMode->findText( configuration.shadowCacheModeName( true ) ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -86,12 +86,6 @@ namespace Oxygen
|
|||
<< Configuration::sizeGripModeName( Configuration::SizeGripWhenNeeded, true )
|
||||
);
|
||||
|
||||
// shadows
|
||||
ui.shadowMode->insertItems(0, QStringList()
|
||||
<< Configuration::shadowModeName( Configuration::OxygenShadows, true )
|
||||
<< Configuration::shadowModeName( Configuration::KWinShadows, true )
|
||||
<< Configuration::shadowModeName( Configuration::NoShadows, true ) );
|
||||
|
||||
ui.shadowCacheMode->insertItems(0, QStringList()
|
||||
<< Configuration::shadowCacheModeName( Configuration::CacheDisabled, true )
|
||||
<< Configuration::shadowCacheModeName( Configuration::CacheVariable, true )
|
||||
|
@ -101,8 +95,6 @@ namespace Oxygen
|
|||
shadowConfigurations.push_back( ui.inactiveShadowConfiguration );
|
||||
|
||||
// connections
|
||||
connect( ui.shadowMode, SIGNAL( currentIndexChanged(int)), SLOT(shadowModeChanged(int)) );
|
||||
connect( ui.shadowMode, SIGNAL( currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( ui.shadowCacheMode, SIGNAL( currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( ui.titleOutline, SIGNAL(toggled( bool )), ui.separatorMode, SLOT( setDisabled( bool ) ) );
|
||||
|
||||
|
@ -152,11 +144,4 @@ namespace Oxygen
|
|||
|
||||
}
|
||||
|
||||
//_________________________________________________________
|
||||
void ConfigurationUi::shadowModeChanged( int index )
|
||||
{
|
||||
bool enabled( ui.shadowMode->itemText( index ) == Configuration::shadowModeName( Configuration::OxygenShadows, true ) );
|
||||
foreach( ShadowConfigurationUi* shadowConfiguration, shadowConfigurations )
|
||||
{ shadowConfiguration->setEnabled( enabled ); }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,11 +58,6 @@ namespace Oxygen
|
|||
//! toggle expert mode
|
||||
void toggleExpertMode( bool );
|
||||
|
||||
protected slots:
|
||||
|
||||
//! shadow mode changed
|
||||
void shadowModeChanged( int );
|
||||
|
||||
signals:
|
||||
|
||||
//! emmited when changed
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<item>
|
||||
<widget class="KTabWidget" name="ktabwidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
|
@ -258,35 +258,6 @@
|
|||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="shadowModeLabel">
|
||||
<property name="text">
|
||||
<string>Shadow style:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>shadowMode</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="shadowMode"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>308</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="shadowCacheModeLabel">
|
||||
<property name="text">
|
||||
|
@ -303,6 +274,19 @@
|
|||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="shadowCacheMode"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>308</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -249,12 +249,12 @@ namespace Oxygen
|
|||
{
|
||||
|
||||
if( hideTitleBar() ) mask = QRegion();
|
||||
else if( compositingActive() ) mask = (configuration().shadowMode() == Configuration::OxygenShadows ) ? QRegion():helper().decoRoundedMask( frame, 1, 1, 1, 0 );
|
||||
else if( compositingActive() ) mask = QRegion();
|
||||
else mask = helper().roundedMask( frame, 1, 1, 1, 0 );
|
||||
|
||||
} else {
|
||||
|
||||
if( compositingActive() ) mask = (configuration().shadowMode() == Configuration::OxygenShadows ) ? QRegion():helper().decoRoundedMask( frame );
|
||||
if( compositingActive() ) mask = QRegion();
|
||||
else mask = helper().roundedMask( frame );
|
||||
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ namespace Oxygen
|
|||
_animationsDuration( 150 ),
|
||||
_tabsEnabled( true ),
|
||||
_useNarrowButtonSpacing( false ),
|
||||
_shadowMode( OxygenShadows ),
|
||||
_shadowCacheMode( CacheVariable )
|
||||
{}
|
||||
|
||||
|
@ -149,10 +148,6 @@ namespace Oxygen
|
|||
OxygenConfig::NARROW_BUTTON_SPACING,
|
||||
defaultConfiguration.useNarrowButtonSpacing() ) );
|
||||
|
||||
// shadow mode
|
||||
setShadowMode( shadowMode( group.readEntry(
|
||||
OxygenConfig::SHADOW_MODE, defaultConfiguration.shadowModeName( false ) ), false ) );
|
||||
|
||||
// shadow cache mode
|
||||
setShadowCacheMode( shadowCacheMode( group.readEntry(
|
||||
OxygenConfig::SHADOW_CACHE_MODE, defaultConfiguration.shadowCacheModeName( false ) ), false ) );
|
||||
|
@ -200,7 +195,6 @@ namespace Oxygen
|
|||
if( animationsDuration() != defaultConfiguration.animationsDuration() ) group.writeEntry( OxygenConfig::ANIMATIONS_DURATION, animationsDuration() );
|
||||
if( tabsEnabled() != defaultConfiguration.tabsEnabled() ) group.writeEntry( OxygenConfig::TABS_ENABLED, tabsEnabled() );
|
||||
if( useNarrowButtonSpacing() != defaultConfiguration.useNarrowButtonSpacing() ) group.writeEntry( OxygenConfig::NARROW_BUTTON_SPACING, useNarrowButtonSpacing() );
|
||||
if( shadowMode() != defaultConfiguration.shadowMode() ) group.writeEntry( OxygenConfig::SHADOW_MODE, shadowModeName( false ) );
|
||||
if( shadowCacheMode() != defaultConfiguration.shadowCacheMode() ) group.writeEntry( OxygenConfig::SHADOW_CACHE_MODE, shadowCacheModeName( false ) );
|
||||
|
||||
}
|
||||
|
@ -386,36 +380,10 @@ namespace Oxygen
|
|||
animationsDuration() == other.animationsDuration() &&
|
||||
tabsEnabled() == other.tabsEnabled() &&
|
||||
useNarrowButtonSpacing() == other.useNarrowButtonSpacing() &&
|
||||
shadowMode() == other.shadowMode() &&
|
||||
shadowCacheMode() == other.shadowCacheMode();
|
||||
|
||||
}
|
||||
|
||||
//__________________________________________________
|
||||
QString Configuration::shadowModeName( ShadowMode value, bool translated )
|
||||
{
|
||||
QString out;
|
||||
switch( value )
|
||||
{
|
||||
case OxygenShadows: out = translated ? i18n( "Use Oxygen Shadows" ):"Use Oxygen Shadows"; break;
|
||||
case KWinShadows: out = translated ? i18n( "Use Desktop Effects Shadows" ):"Use Desktop Effects Shadows"; break;
|
||||
case NoShadows: out = translated ? i18n( "Do Not Draw Shadows" ):"Do Not Draw Shadows"; break;
|
||||
default: return Configuration().shadowModeName( translated );
|
||||
}
|
||||
|
||||
return out;
|
||||
|
||||
}
|
||||
|
||||
//__________________________________________________
|
||||
Configuration::ShadowMode Configuration::shadowMode( QString value, bool translated )
|
||||
{
|
||||
if( value == shadowModeName( OxygenShadows, translated ) ) return OxygenShadows;
|
||||
else if( value == shadowModeName( KWinShadows, translated ) ) return KWinShadows;
|
||||
else if( value == shadowModeName( NoShadows, translated ) ) return NoShadows;
|
||||
else return Configuration().shadowMode();
|
||||
}
|
||||
|
||||
//__________________________________________________
|
||||
QString Configuration::shadowCacheModeName( ShadowCacheMode value, bool translated )
|
||||
{
|
||||
|
|
|
@ -95,13 +95,6 @@ namespace Oxygen
|
|||
SizeGripWhenNeeded
|
||||
};
|
||||
|
||||
//! shadow mode
|
||||
enum ShadowMode {
|
||||
OxygenShadows,
|
||||
KWinShadows,
|
||||
NoShadows
|
||||
};
|
||||
|
||||
//! shadow cache mode
|
||||
enum ShadowCacheMode {
|
||||
//! no shadow cache
|
||||
|
@ -200,23 +193,6 @@ namespace Oxygen
|
|||
|
||||
//@}
|
||||
|
||||
//!@name shadow mode
|
||||
//@{
|
||||
static QString shadowModeName( ShadowMode, bool translated );
|
||||
static ShadowMode shadowMode( QString, bool translated );
|
||||
|
||||
QString shadowModeName( bool translated ) const
|
||||
{ return shadowModeName( shadowMode(), translated ); }
|
||||
|
||||
void setShadowMode( ShadowMode mode )
|
||||
{ _shadowMode = mode; }
|
||||
|
||||
ShadowMode shadowMode( void ) const
|
||||
{ return _shadowMode; }
|
||||
|
||||
//@]
|
||||
|
||||
|
||||
//!@name shadow mode cache mode
|
||||
//@{
|
||||
|
||||
|
@ -420,9 +396,6 @@ namespace Oxygen
|
|||
//! narrow button spacing
|
||||
bool _useNarrowButtonSpacing;
|
||||
|
||||
//! shadow mode
|
||||
ShadowMode _shadowMode;
|
||||
|
||||
//! shadow cache mode
|
||||
ShadowCacheMode _shadowCacheMode;
|
||||
|
||||
|
|
|
@ -123,13 +123,6 @@ namespace Oxygen
|
|||
changed = true;
|
||||
}
|
||||
|
||||
// shadow mode
|
||||
if( configuration.shadowMode() != Configuration::OxygenShadows )
|
||||
{
|
||||
defaultConfiguration().setUseOxygenShadows( false );
|
||||
defaultConfiguration().setUseDropShadows( false );
|
||||
}
|
||||
|
||||
// read shadowCache configuration
|
||||
changed |= shadowCache().readConfig( config );
|
||||
|
||||
|
@ -172,7 +165,7 @@ namespace Oxygen
|
|||
|
||||
// compositing
|
||||
case AbilityProvidesShadow: // TODO: UI option to use default shadows instead
|
||||
return defaultConfiguration().shadowMode() != Configuration::KWinShadows;
|
||||
return true;
|
||||
|
||||
case AbilityUsesAlphaChannel:
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue