KCM KWinTabbox activate/deactivate desktop effects. Fix default value for highlightWindowsEnabled

This commit is contained in:
Cyril Rossi 2021-04-22 18:58:31 +02:00
parent 5bc3316e54
commit 8af45aa962
2 changed files with 5 additions and 11 deletions

View file

@ -12,7 +12,7 @@
<default code="true">BuiltInEffects::enabledByDefault(BuiltInEffect::FlipSwitch)</default>
</entry>
<entry key="highlightwindowEnabled" type="Bool">
<default>false</default>
<default code="true">BuiltInEffects::enabledByDefault(BuiltInEffect::HighlightWindow)</default>
</entry>
</group>
</kcfg>

View file

@ -344,16 +344,10 @@ void KWinTabBoxConfig::save()
const bool flipSwitchAlternative = m_alternativeTabBoxUi->showTabBox()
&& m_alternativeTabBoxUi->effectComboCurrentData().toString() == m_flipSwitch;
// activate effects if not active
if (coverSwitch || coverSwitchAlternative) {
m_data->pluginsConfig()->setCoverswitchEnabled(true);
}
if (flipSwitch || flipSwitchAlternative) {
m_data->pluginsConfig()->setFlipswitchEnabled(true);
}
if (highlightWindows) {
m_data->pluginsConfig()->setHighlightwindowEnabled(true);
}
// activate effects if they are used otherwise deactivate them.
m_data->pluginsConfig()->setCoverswitchEnabled(coverSwitch || coverSwitchAlternative);
m_data->pluginsConfig()->setFlipswitchEnabled(flipSwitch || flipSwitchAlternative);
m_data->pluginsConfig()->setHighlightwindowEnabled(highlightWindows);
m_data->pluginsConfig()->save();
m_data->coverSwitchConfig()->setTabBox(coverSwitch);