From a3c48c3871edf4c390a47a92cfebaa082878f5e2 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 6 Feb 2021 13:16:10 +0200 Subject: [PATCH] update properly checkboxes in dock settings pages --- .../configuration/pages/AppearanceConfig.qml | 21 +++++-------------- .../configuration/pages/BehaviorConfig.qml | 8 +++---- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/shell/package/contents/configuration/pages/AppearanceConfig.qml b/shell/package/contents/configuration/pages/AppearanceConfig.qml index 82402be9d..c693485b1 100644 --- a/shell/package/contents/configuration/pages/AppearanceConfig.qml +++ b/shell/package/contents/configuration/pages/AppearanceConfig.qml @@ -797,7 +797,7 @@ PlasmaComponents.Page { tooltip: i18n("Enable/disable background") onPressed: { - plasmoid.configuration.useThemePanel = !plasmoid.configuration.useThemePanel; + plasmoid.configuration.useThemePanel = checked; } } @@ -878,11 +878,6 @@ PlasmaComponents.Page { stepSize: 1 wheelEnabled: false - /*property bool blockOpacityAdjustment: (plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.backgroundOnlyOnMaximized) - || (solidBackground.checked - && !plasmoid.configuration.solidBackgroundForMaximized - && !plasmoid.configuration.backgroundOnlyOnMaximized)*/ - function updatePanelTransparency() { if (!pressed) plasmoid.configuration.panelTransparency = value @@ -1046,15 +1041,12 @@ PlasmaComponents.Page { Layout.maximumWidth: Layout.minimumWidth text: i18n("Outline") checkable: true + checked: plasmoid.configuration.panelOutline enabled: showBackground.checked tooltip: i18n("Background draws a line for its borders. You can set the line size from Latte Preferences") - readonly property int panelOutline: plasmoid.configuration.panelOutline - - onPanelOutlineChanged: checked = panelOutline - onClicked: { - plasmoid.configuration.panelOutline = !plasmoid.configuration.panelOutline; + plasmoid.configuration.panelOutline = checked; } } @@ -1064,6 +1056,7 @@ PlasmaComponents.Page { Layout.maximumWidth: Layout.minimumWidth text: i18n("All Corners") checkable: true + checked: plasmoid.configuration.backgroundAllCorners enabled: showBackground.checked && ((plasmoid.configuration.screenEdgeMargin===-1) /*no-floating*/ || (plasmoid.configuration.screenEdgeMargin > -1 /*floating with justify alignment and 100% maxlength*/ @@ -1071,12 +1064,8 @@ PlasmaComponents.Page { && plasmoid.configuration.maxLength===100)) tooltip: i18n("Background draws all corners at all cases.") - readonly property int backgroundAllCorners: plasmoid.configuration.backgroundAllCorners - - onBackgroundAllCornersChanged: checked = backgroundAllCorners - onClicked: { - plasmoid.configuration.backgroundAllCorners = !plasmoid.configuration.backgroundAllCorners; + plasmoid.configuration.backgroundAllCorners = checked; } } } diff --git a/shell/package/contents/configuration/pages/BehaviorConfig.qml b/shell/package/contents/configuration/pages/BehaviorConfig.qml index 67e0865b4..d214363b9 100644 --- a/shell/package/contents/configuration/pages/BehaviorConfig.qml +++ b/shell/package/contents/configuration/pages/BehaviorConfig.qml @@ -797,10 +797,9 @@ PlasmaComponents.Page { text: i18n("Thin title tooltips on hovering") tooltip: i18n("Show narrow tooltips produced by Latte for items.\nThese tooltips are not drawn when applets zoom effect is disabled"); checked: plasmoid.configuration.titleTooltips - enabled: latteView.type === LatteCore.Types.DockView onClicked: { - plasmoid.configuration.titleTooltips = !plasmoid.configuration.titleTooltips; + plasmoid.configuration.titleTooltips = checked; } } @@ -813,7 +812,7 @@ PlasmaComponents.Page { visible: dialog.advancedLevel onClicked: { - plasmoid.configuration.mouseWheelActions = !plasmoid.configuration.mouseWheelActions; + plasmoid.configuration.mouseWheelActions = checked; } } @@ -824,10 +823,9 @@ PlasmaComponents.Page { checked: plasmoid.configuration.autoSizeEnabled tooltip: i18n("Items decrease their size when exceed maximum length and increase it when they can fit in") visible: dialog.advancedLevel - enabled: latteView.type === LatteCore.Types.DockView onClicked: { - plasmoid.configuration.autoSizeEnabled = !plasmoid.configuration.autoSizeEnabled + plasmoid.configuration.autoSizeEnabled = checked } }