[kcmkwin/kwindesktop] Make Slide effect configurable

Summary:
Even though the Slide effect has a KCM, it's not possible to configure
it [slide effect] from the virtual desktops KCM.

This change addresses the problem above.

### Before

{F5912774, layout=center, size=full}

### After

{F5912775, layout=center, size=full}

BUG: 395377

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13544
This commit is contained in:
Vlad Zagorodniy 2018-06-14 20:01:53 +03:00
parent ddb44b4383
commit 586460dbfc

View file

@ -521,9 +521,16 @@ void KWinDesktopConfig::slotEffectSelectionChanged(int index)
if (index != 0)
enabled = true;
m_ui->effectInfoButton->setEnabled(enabled);
// only cube has config dialog
if (index != 2)
switch (index) {
case 1: // Slide
case 2: // Cube Slide
enabled = true;
break;
default:
enabled = false;
break;
}
m_ui->effectConfigButton->setEnabled(enabled);
}
@ -610,6 +617,9 @@ void KWinDesktopConfig::slotConfigureEffectClicked()
{
QString effect;
switch(m_ui->effectComboBox->currentIndex()) {
case 1:
effect = BuiltInEffects::nameForEffect(BuiltInEffect::Slide);
break;
case 2:
effect = BuiltInEffects::nameForEffect(BuiltInEffect::CubeSlide);
break;