Added option to not elevate selected window in box switch.
svn path=/trunk/KDE/kdebase/workspace/; revision=857724
This commit is contained in:
parent
ac3ac459e8
commit
8d6746087e
4 changed files with 24 additions and 3 deletions
|
@ -47,6 +47,7 @@ BoxSwitchEffect::BoxSwitchEffect()
|
|||
KConfigGroup conf = effects->effectConfig( "BoxSwitch" );
|
||||
|
||||
bg_opacity = conf.readEntry( "BackgroundOpacity", 25 ) / 100.0;
|
||||
elevate_window = conf.readEntry( "ElevateSelected", true );
|
||||
|
||||
frame_margin = 10;
|
||||
highlight_margin = 5;
|
||||
|
@ -359,12 +360,12 @@ void BoxSwitchEffect::setInactive()
|
|||
|
||||
void BoxSwitchEffect::setSelectedWindow( EffectWindow* w )
|
||||
{
|
||||
if( selected_window )
|
||||
if( elevate_window && selected_window )
|
||||
{
|
||||
effects->setElevatedWindow( selected_window, false );
|
||||
}
|
||||
selected_window = w;
|
||||
if( w )
|
||||
if( elevate_window && w )
|
||||
{
|
||||
effects->setElevatedWindow( selected_window, true );
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ class BoxSwitchEffect
|
|||
QColor color_text;
|
||||
|
||||
float bg_opacity;
|
||||
bool elevate_window;
|
||||
|
||||
QHash< EffectWindow*, ItemInfo* > windows;
|
||||
EffectWindowList original_windows;
|
||||
|
|
|
@ -46,6 +46,7 @@ BoxSwitchEffectConfig::BoxSwitchEffectConfig(QWidget* parent, const QVariantList
|
|||
layout->addWidget( m_ui );
|
||||
|
||||
connect( m_ui->opacitySpin, SIGNAL( valueChanged(int) ), this, SLOT( changed() ));
|
||||
connect( m_ui->elevateBox, SIGNAL( stateChanged(int) ), this, SLOT( changed() ));
|
||||
|
||||
load();
|
||||
}
|
||||
|
@ -63,6 +64,9 @@ void BoxSwitchEffectConfig::load()
|
|||
int opacity = conf.readEntry( "BackgroundOpacity", 25 );
|
||||
m_ui->opacitySpin->setValue( opacity );
|
||||
|
||||
bool elevate = conf.readEntry( "ElevateSelected", true );
|
||||
m_ui->elevateBox->setChecked( elevate );
|
||||
|
||||
emit changed(false);
|
||||
}
|
||||
|
||||
|
@ -74,6 +78,8 @@ void BoxSwitchEffectConfig::save()
|
|||
|
||||
conf.writeEntry( "BackgroundOpacity", m_ui->opacitySpin->value() );
|
||||
|
||||
conf.writeEntry( "ElevateSelected", m_ui->elevateBox->isChecked() );
|
||||
|
||||
conf.sync();
|
||||
|
||||
emit changed(false);
|
||||
|
@ -83,6 +89,7 @@ void BoxSwitchEffectConfig::save()
|
|||
void BoxSwitchEffectConfig::defaults()
|
||||
{
|
||||
m_ui->opacitySpin->setValue( 25 );
|
||||
m_ui->elevateBox->setChecked( true );
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>175</width>
|
||||
<height>59</height>
|
||||
<height>86</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
|
@ -53,8 +53,20 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="elevateBox" >
|
||||
<property name="text" >
|
||||
<string>&Elevate selected window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>opacitySlider</tabstop>
|
||||
<tabstop>opacitySpin</tabstop>
|
||||
<tabstop>elevateBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
|
|
Loading…
Reference in a new issue