ControlCenter: add colorize distro toggle

This commit is contained in:
Ly-sec
2025-11-10 12:47:49 +01:00
parent 5ec97ac750
commit c6bd84dfaa
13 changed files with 70 additions and 14 deletions
@@ -17,12 +17,14 @@ 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)
function saveSettings() {
var settings = Object.assign({}, widgetData || {})
settings.icon = valueIcon
settings.useDistroLogo = valueUseDistroLogo
settings.customIconPath = valueCustomIconPath
settings.colorizeDistroLogo = valueColorizeDistroLogo
return settings
}
@@ -39,6 +41,16 @@ 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
onToggled: function (checked) {
valueColorizeDistroLogo = checked
}
}
RowLayout {
spacing: Style.marginM
@@ -761,10 +761,10 @@ ColumnLayout {
NCheckbox {
label: "Spicetify"
description: ProgramCheckerService.spicetifyAvailable ? I18n.tr("settings.color-scheme.templates.programs.spicetify.description", {
"filepath": "~/.config/spicetify/Themes/Comfy/color.ini"
}) : I18n.tr("settings.color-scheme.templates.programs.spicetify.description-missing", {
"app": "spicetify"
})
"filepath": "~/.config/spicetify/Themes/Comfy/color.ini"
}) : I18n.tr("settings.color-scheme.templates.programs.spicetify.description-missing", {
"app": "spicetify"
})
checked: Settings.data.templates.spicetify
enabled: ProgramCheckerService.spicetifyAvailable
opacity: ProgramCheckerService.spicetifyAvailable ? 1.0 : 0.6