Add of config option if the cube should be shown when desktop is changed via pager or ctrl+f1-4.
Turned of per default. svn path=/trunk/KDE/kdebase/workspace/; revision=842306
This commit is contained in:
parent
f10369232e
commit
37512e7591
4 changed files with 30 additions and 6 deletions
|
@ -70,6 +70,7 @@ CubeEffect::CubeEffect()
|
|||
, slide( false )
|
||||
, oldDesktop( 0 )
|
||||
, activeScreen( 0 )
|
||||
, animateDesktopChange( false )
|
||||
{
|
||||
KConfigGroup conf = effects->effectConfig( "Cube" );
|
||||
borderActivate = (ElectricBorder)conf.readEntry( "BorderActivate", (int)ElectricNone );
|
||||
|
@ -80,6 +81,7 @@ CubeEffect::CubeEffect()
|
|||
reflection = conf.readEntry( "Reflection", true );
|
||||
rotationDuration = conf.readEntry( "RotationDuration", 500 );
|
||||
backgroundColor = conf.readEntry( "BackgroundColor", QColor( Qt::black ) );
|
||||
animateDesktopChange = conf.readEntry( "AnimateDesktopChange", false );
|
||||
capColor = conf.readEntry( "CapColor", KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
paintCaps = conf.readEntry( "Caps", true );
|
||||
QString file = conf.readEntry( "Wallpaper", QString("") );
|
||||
|
@ -1550,6 +1552,8 @@ void CubeEffect::desktopChanged( int old )
|
|||
return;
|
||||
if( activated )
|
||||
return;
|
||||
if( !animateDesktopChange )
|
||||
return;
|
||||
slide = true;
|
||||
oldDesktop = old;
|
||||
setActive( true );
|
||||
|
|
|
@ -105,6 +105,7 @@ class CubeEffect
|
|||
int rotationDuration;
|
||||
QList<EffectWindow*> windowsOnOtherScreens;
|
||||
int activeScreen;
|
||||
bool animateDesktopChange;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -76,6 +76,7 @@ CubeEffectConfig::CubeEffectConfig(QWidget* parent, const QVariantList& args) :
|
|||
connect(m_ui->displayDesktopNameBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->reflectionBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->backgroundColorButton, SIGNAL(changed(QColor)), this, SLOT(changed()));
|
||||
connect(m_ui->animateDesktopChangeBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeCapsBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->cubeCapsBox, SIGNAL(stateChanged(int)), this, SLOT(capsSelectionChanged()));
|
||||
connect(m_ui->capsImageBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
|
@ -99,6 +100,7 @@ void CubeEffectConfig::load()
|
|||
QColor capColor = conf.readEntry( "CapColor", KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
bool texturedCaps = conf.readEntry( "TexturedCaps", true );
|
||||
bool caps = conf.readEntry( "Caps", true );
|
||||
bool animateChange = conf.readEntry( "AnimateDesktopChange", false );
|
||||
if( activateBorder == (int)ElectricNone )
|
||||
activateBorder--;
|
||||
m_ui->screenEdgeCombo->setCurrentIndex( activateBorder );
|
||||
|
@ -138,6 +140,14 @@ void CubeEffectConfig::load()
|
|||
{
|
||||
m_ui->capsImageBox->setCheckState( Qt::Unchecked );
|
||||
}
|
||||
if( animateChange )
|
||||
{
|
||||
m_ui->animateDesktopChangeBox->setCheckState( Qt::Checked );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui->animateDesktopChangeBox->setCheckState( Qt::Unchecked );
|
||||
}
|
||||
m_ui->backgroundColorButton->setColor( background );
|
||||
m_ui->capColorButton->setColor( capColor );
|
||||
capsSelectionChanged();
|
||||
|
@ -157,6 +167,7 @@ void CubeEffectConfig::save()
|
|||
conf.writeEntry( "Caps", m_ui->cubeCapsBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "CapColor", m_ui->capColorButton->color() );
|
||||
conf.writeEntry( "TexturedCaps", m_ui->capsImageBox->checkState() == Qt::Checked ? true : false );
|
||||
conf.writeEntry( "AnimateDesktopChange", m_ui->animateDesktopChangeBox->checkState() == Qt::Checked ? true : false );
|
||||
|
||||
int activateBorder = m_ui->screenEdgeCombo->currentIndex();
|
||||
if( activateBorder == (int)ELECTRIC_COUNT )
|
||||
|
@ -183,6 +194,7 @@ void CubeEffectConfig::defaults()
|
|||
m_ui->cubeCapsBox->setCheckState( Qt::Checked );
|
||||
m_ui->capColorButton->setColor( KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
m_ui->capsImageBox->setCheckState( Qt::Checked );
|
||||
m_ui->animateDesktopChangeBox->setCheckState( Qt::Unchecked );
|
||||
m_ui->editor->allDefault();
|
||||
emit changed(true);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" >
|
||||
<item row="10" column="0" >
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="text" >
|
||||
<string>&Background Color:</string>
|
||||
|
@ -156,17 +156,17 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1" >
|
||||
<item row="10" column="1" >
|
||||
<widget class="KColorButton" name="backgroundColorButton" />
|
||||
</item>
|
||||
<item row="10" column="0" >
|
||||
<item row="11" column="0" >
|
||||
<widget class="QCheckBox" name="cubeCapsBox" >
|
||||
<property name="text" >
|
||||
<string>Cube &Caps</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0" >
|
||||
<item row="12" column="0" >
|
||||
<widget class="QLabel" name="capColorLabel" >
|
||||
<property name="text" >
|
||||
<string>C&ap Color:</string>
|
||||
|
@ -176,16 +176,23 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1" >
|
||||
<item row="12" column="1" >
|
||||
<widget class="KColorButton" name="capColorButton" />
|
||||
</item>
|
||||
<item row="12" column="0" >
|
||||
<item row="13" column="0" >
|
||||
<widget class="QCheckBox" name="capsImageBox" >
|
||||
<property name="text" >
|
||||
<string>Display &image on cube caps</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0" >
|
||||
<widget class="QCheckBox" name="animateDesktopChangeBox" >
|
||||
<property name="text" >
|
||||
<string>&Show cube when desktop changed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue