From 02c388d2bfe4915440963572ae70f7e699d24aab Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 26 Mar 2019 20:22:37 +0200 Subject: [PATCH] enabled customIndicator toggle button --- .../package/contents/configuration/pages/EffectsConfig.qml | 7 ++++++- shell/package/contents/controls/CustomIndicatorButton.qml | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/shell/package/contents/configuration/pages/EffectsConfig.qml b/shell/package/contents/configuration/pages/EffectsConfig.qml index 91c60b6a5..b579ec7a9 100644 --- a/shell/package/contents/configuration/pages/EffectsConfig.qml +++ b/shell/package/contents/configuration/pages/EffectsConfig.qml @@ -481,7 +481,11 @@ PlasmaComponents.Page { id: indicatorStyleGroup onCurrentChanged: { if (current.checked) { - latteView.indicator.type = current.type + if (current === customIndicator.button) { + latteView.indicator.type = customIndicator.type + } else { + latteView.indicator.type = current.type + } } } } @@ -509,6 +513,7 @@ PlasmaComponents.Page { } LatteExtraControls.CustomIndicatorButton { + id: customIndicator Layout.fillWidth: true checked: parent.type === type checkable: true diff --git a/shell/package/contents/controls/CustomIndicatorButton.qml b/shell/package/contents/controls/CustomIndicatorButton.qml index 6fb64e04b..21d469351 100644 --- a/shell/package/contents/controls/CustomIndicatorButton.qml +++ b/shell/package/contents/controls/CustomIndicatorButton.qml @@ -26,6 +26,7 @@ import org.kde.latte.components 1.0 as LatteComponents LatteComponents.ComboBoxButton{ + id: custom buttonText: "Unity" comboBoxTextRole: "name" comboBoxIconRole: "icon" @@ -58,7 +59,7 @@ LatteComponents.ComboBoxButton{ comboBox.model = actionsModel; - if (latteView.indicator.customPluginsCount > 0) { + if (custom.type === latteView.indicator.type) { comboBox.currentIndex = 0; } else { comboBox.currentIndex = -1;