From f04622ade77e1a1ead80fa32ea862b35211c3563 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Sun, 30 Nov 2025 11:46:33 -0500 Subject: [PATCH] autoformat --- Modules/Bar/Widgets/ControlCenter.qml | 40 ++++++++++++------- .../WidgetSettings/ControlCenterSettings.qml | 27 ++++++++++--- 2 files changed, 46 insertions(+), 21 deletions(-) diff --git a/Modules/Bar/Widgets/ControlCenter.qml b/Modules/Bar/Widgets/ControlCenter.qml index 47e3ec7f..5336f568 100644 --- a/Modules/Bar/Widgets/ControlCenter.qml +++ b/Modules/Bar/Widgets/ControlCenter.qml @@ -42,27 +42,38 @@ NIconButton { return widgetMetadata.colorizeSystemIcon !== undefined ? widgetMetadata.colorizeSystemIcon : "none"; } - readonly property bool isColorizing: enableColorization && colorizeSystemIcon !== "none" readonly property color iconColor: { - if (!isColorizing) return Color.mOnSurface; + if (!isColorizing) + return Color.mOnSurface; switch (colorizeSystemIcon) { - case "primary": return Color.mPrimary; - case "secondary": return Color.mSecondary; - case "tertiary": return Color.mTertiary; - case "error": return Color.mError; - default: return Color.mOnSurface; + case "primary": + return Color.mPrimary; + case "secondary": + return Color.mSecondary; + case "tertiary": + return Color.mTertiary; + case "error": + return Color.mError; + default: + return Color.mOnSurface; } } readonly property color iconHoverColor: { - if (!isColorizing) return Color.mOnHover; + if (!isColorizing) + return Color.mOnHover; switch (colorizeSystemIcon) { - case "primary": return Qt.darker(Color.mPrimary, 1.2); - case "secondary": return Qt.darker(Color.mSecondary, 1.2); - case "tertiary": return Qt.darker(Color.mTertiary, 1.2); - case "error": return Qt.darker(Color.mError, 1.2); - default: return Color.mOnHover; + case "primary": + return Qt.darker(Color.mPrimary, 1.2); + case "secondary": + return Qt.darker(Color.mSecondary, 1.2); + case "tertiary": + return Qt.darker(Color.mTertiary, 1.2); + case "error": + return Qt.darker(Color.mError, 1.2); + default: + return Color.mOnHover; } } @@ -154,8 +165,7 @@ NIconButton { asynchronous: true layer.enabled: isColorizing && (useDistroLogo || customIconPath !== "") layer.effect: ShaderEffect { - property color targetColor: isColorizing ? iconColor : - (Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mSurfaceVariant) + property color targetColor: isColorizing ? iconColor : (Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mSurfaceVariant) property real colorizeMode: 2.0 fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/appicon_colorize.frag.qsb") diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml index 7886b6db..9f6f6fcf 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml @@ -53,14 +53,29 @@ ColumnLayout { label: I18n.tr("bar.widget-settings.control-center.color-selection.label") description: I18n.tr("bar.widget-settings.control-center.color-selection.description") model: [ - { "name": I18n.tr("options.colors.none"), "key": "none" }, - { "name": I18n.tr("options.colors.primary"), "key": "primary" }, - { "name": I18n.tr("options.colors.secondary"), "key": "secondary" }, - { "name": I18n.tr("options.colors.tertiary"), "key": "tertiary" }, - { "name": I18n.tr("options.colors.error"), "key": "error" } + { + "name": I18n.tr("options.colors.none"), + "key": "none" + }, + { + "name": I18n.tr("options.colors.primary"), + "key": "primary" + }, + { + "name": I18n.tr("options.colors.secondary"), + "key": "secondary" + }, + { + "name": I18n.tr("options.colors.tertiary"), + "key": "tertiary" + }, + { + "name": I18n.tr("options.colors.error"), + "key": "error" + } ] currentKey: valueColorizeSystemIcon - onSelected: function(key) { + onSelected: function (key) { valueColorizeSystemIcon = key; } }