diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index d2ad637c..80dd6571 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -102,26 +102,22 @@ "control-center": { "browse-file": "Browse File", "browse-library": "Browse Library", - "colorize-distro-logo": { - "description": "Apply theme colors to your distribution logo.", - "label": "Colorize distro logo" + "icon": { + "description": "Select an icon from the library or a custom file.", + "label": "Icon" + }, + "enable-colorization": { + "description": "Enable colorization for the control center icon, applying theme colors.", + "label": "Enable Colorization" }, "color-selection": { "description": "Apply theme colors to icons.", "label": "Select Color" }, - "icon": { - "description": "Select an icon from the library or a custom file.", - "label": "Icon" - }, "select-custom-icon": "Select a custom icon", "use-distro-logo": { "description": "Use your distribution's logo instead of a custom icon.", "label": "Use distro logo instead of icon" - }, - "colorize-system-icon": { - "description": "Apply theme colors to system icons.", - "label": "Colorize system icon" } }, "custom-button": { diff --git a/Modules/Bar/Widgets/ControlCenter.qml b/Modules/Bar/Widgets/ControlCenter.qml index 7fc2649a..47e3ec7f 100644 --- a/Modules/Bar/Widgets/ControlCenter.qml +++ b/Modules/Bar/Widgets/ControlCenter.qml @@ -34,19 +34,16 @@ NIconButton { readonly property string customIcon: widgetSettings.icon || widgetMetadata.icon readonly property bool useDistroLogo: (widgetSettings.useDistroLogo !== undefined) ? widgetSettings.useDistroLogo : widgetMetadata.useDistroLogo readonly property string customIconPath: widgetSettings.customIconPath || "" - readonly property bool colorizeDistroLogo: { - if (widgetSettings.colorizeDistroLogo !== undefined) - return widgetSettings.colorizeDistroLogo; - return widgetMetadata.colorizeDistroLogo !== undefined ? widgetMetadata.colorizeDistroLogo : false; - } + readonly property bool enableColorization: widgetSettings.enableColorization || false + readonly property string colorizeSystemIcon: { if (widgetSettings.colorizeSystemIcon !== undefined) return widgetSettings.colorizeSystemIcon; return widgetMetadata.colorizeSystemIcon !== undefined ? widgetMetadata.colorizeSystemIcon : "none"; } - readonly property bool systemIconColorizingEnabled: (customIconPath === "" && !useDistroLogo) && colorizeSystemIcon !== "none" - readonly property bool distroLogoColorizingEnabled: useDistroLogo && colorizeDistroLogo && colorizeSystemIcon !== "none" - readonly property bool isColorizing: systemIconColorizingEnabled || distroLogoColorizingEnabled + + + readonly property bool isColorizing: enableColorization && colorizeSystemIcon !== "none" readonly property color iconColor: { if (!isColorizing) return Color.mOnSurface; @@ -155,9 +152,9 @@ NIconButton { visible: source !== "" smooth: true asynchronous: true - layer.enabled: useDistroLogo && colorizeDistroLogo + layer.enabled: isColorizing && (useDistroLogo || customIconPath !== "") layer.effect: ShaderEffect { - property color targetColor: distroLogoColorizingEnabled ? iconColor : + property color targetColor: isColorizing ? iconColor : (Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mSurfaceVariant) property real colorizeMode: 2.0 diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml index 8f060ec3..7886b6db 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml @@ -17,7 +17,7 @@ ColumnLayout { property string valueIcon: widgetData.icon !== undefined ? widgetData.icon : widgetMetadata.icon property bool valueUseDistroLogo: widgetData.useDistroLogo !== undefined ? widgetData.useDistroLogo : widgetMetadata.useDistroLogo property string valueCustomIconPath: widgetData.customIconPath !== undefined ? widgetData.customIconPath : "" - property bool valueColorizeDistroLogo: widgetData.colorizeDistroLogo !== undefined ? widgetData.colorizeDistroLogo : (widgetMetadata.colorizeDistroLogo !== undefined ? widgetMetadata.colorizeDistroLogo : false) + property bool valueEnableColorization: widgetData.enableColorization || false property string valueColorizeSystemIcon: widgetData.colorizeSystemIcon !== undefined ? widgetData.colorizeSystemIcon : (widgetMetadata.colorizeSystemIcon !== undefined ? widgetMetadata.colorizeSystemIcon : "none") function saveSettings() { @@ -25,7 +25,7 @@ ColumnLayout { settings.icon = valueIcon; settings.useDistroLogo = valueUseDistroLogo; settings.customIconPath = valueCustomIconPath; - settings.colorizeDistroLogo = valueColorizeDistroLogo; + settings.enableColorization = valueEnableColorization; settings.colorizeSystemIcon = valueColorizeSystemIcon; return settings; } @@ -40,18 +40,17 @@ ColumnLayout { } NToggle { - visible: valueUseDistroLogo - label: I18n.tr("bar.widget-settings.control-center.colorize-distro-logo.label") - description: I18n.tr("bar.widget-settings.control-center.colorize-distro-logo.description") - checked: valueColorizeDistroLogo + label: I18n.tr("bar.widget-settings.control-center.enable-colorization.label") + description: I18n.tr("bar.widget-settings.control-center.enable-colorization.description") + checked: valueEnableColorization onToggled: function (checked) { - valueColorizeDistroLogo = checked; + valueEnableColorization = checked; } } NComboBox { - visible: (!valueUseDistroLogo && valueIcon !== "" && valueCustomIconPath === "") || (valueUseDistroLogo && valueColorizeDistroLogo) - label: !valueUseDistroLogo ? I18n.tr("bar.widget-settings.control-center.colorize-system-icon.label") : I18n.tr("bar.widget-settings.control-center.color-selection.label") + visible: valueEnableColorization + 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" },