diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index a7f33d97..823bedd6 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "Logo Ihrer Distribution anstelle eines benutzerdefinierten Symbols verwenden.", "label": "Distro-Logo anstelle von Symbol verwenden" + }, + "colorize-distro-logo": { + "description": "Wende die Designfarben auf das Logo deiner Distribution an.", + "label": "Distro-Logo einfärben" } }, "custom-button": { diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 818438cc..599e4afd 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "Use your distribution's logo instead of a custom icon.", "label": "Use distro logo instead of icon" + }, + "colorize-distro-logo": { + "description": "Apply theme colors to your distribution logo.", + "label": "Colorize distro logo" } }, "custom-button": { diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index c5ad8291..884938bc 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "Usar el logo de tu distribución en lugar de un icono personalizado.", "label": "Usar logo de la distribución en lugar de icono" + }, + "colorize-distro-logo": { + "description": "Aplica los colores del tema a tu logotipo de distribución.", + "label": "Colorear logotipo de la distribución" } }, "custom-button": { diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 937d7299..3ac75897 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "Utiliser le logo de votre distribution au lieu d'une icône personnalisée.", "label": "Utiliser le logo de la distribution au lieu de l'icône" + }, + "colorize-distro-logo": { + "description": "Appliquez les couleurs du thème au logo de votre distribution.", + "label": "Coloriser le logo de la distribution" } }, "custom-button": { diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index fc3283bf..8b63b951 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "Usar o logo da sua distribuição em vez de um ícone personalizado.", "label": "Usar logo da distribuição em vez de ícone" + }, + "colorize-distro-logo": { + "description": "Aplicar as cores do tema ao logotipo da sua distribuição.", + "label": "Colorir logo da distribuição" } }, "custom-button": { diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index e235b715..93dfa869 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "Özel ikon yerine dağıtımınızın logosunu kullanın.", "label": "Dağıtım logosunu ikon yerine kullan" + }, + "colorize-distro-logo": { + "description": "Dağıtım logonuza tema renklerini uygula.", + "label": "Dağıtım logosunu renklendir" } }, "custom-button": { diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 009bf24d..b522d3ec 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "Використовувати логотип вашого дистрибутива замість власного значка.", "label": "Використовувати логотип дистрибутива замість значка" + }, + "colorize-distro-logo": { + "description": "Застосувати кольори теми до логотипа вашого дистрибутива.", + "label": "Розфарбовувати логотип дистрибутива" } }, "custom-button": { diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 71c9b99f..93faf8bf 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -105,6 +105,10 @@ "use-distro-logo": { "description": "使用您的发行版徽标而不是自定义图标。", "label": "使用发行版徽标而不是图标" + }, + "colorize-distro-logo": { + "description": "将主题颜色应用到您的发行版徽标。", + "label": "为发行版徽标着色" } }, "custom-button": { diff --git a/Modules/Bar/Widgets/ControlCenter.qml b/Modules/Bar/Widgets/ControlCenter.qml index 2d4e84cf..11daae13 100644 --- a/Modules/Bar/Widgets/ControlCenter.qml +++ b/Modules/Bar/Widgets/ControlCenter.qml @@ -32,6 +32,11 @@ 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 + } // If we have a custom path or distro logo, don't use the theme icon. icon: (customIconPath === "" && !useDistroLogo) ? customIcon : "" @@ -72,5 +77,12 @@ NIconButton { visible: source !== "" smooth: true asynchronous: true + layer.enabled: useDistroLogo && colorizeDistroLogo + layer.effect: ShaderEffect { + property color targetColor: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mSurfaceVariant + property real colorizeMode: 1.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 043ec23c..1b423d9c 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/ColorSchemeTab.qml b/Modules/Panels/Settings/Tabs/ColorSchemeTab.qml index 69df2e5a..d11e6e68 100644 --- a/Modules/Panels/Settings/Tabs/ColorSchemeTab.qml +++ b/Modules/Panels/Settings/Tabs/ColorSchemeTab.qml @@ -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 diff --git a/Services/Theming/TemplateRegistry.qml b/Services/Theming/TemplateRegistry.qml index ba09a558..0ebf7836 100644 --- a/Services/Theming/TemplateRegistry.qml +++ b/Services/Theming/TemplateRegistry.qml @@ -151,16 +151,15 @@ Singleton { "outputs": [{ "path": "~/.vscode/extensions/hyprluna.hyprluna-theme-1.0.2/themes/hyprluna.json" }] - }, - { - "id": "spicetify", - "name": "Spicetify", - "category": "applications", - "input": "spicetify.ini", - "outputs": [{ - "path": "~/.config/spicetify/Themes/Comfy/color.ini" + }, { + "id": "spicetify", + "name": "Spicetify", + "category": "applications", + "input": "spicetify.ini", + "outputs": [{ + "path": "~/.config/spicetify/Themes/Comfy/color.ini" }], - "postProcess": () => `spicetify -q apply --no-restart` + "postProcess": () => `spicetify -q apply --no-restart` }] // Extract Discord clients for ProgramCheckerService compatibility diff --git a/Services/UI/BarWidgetRegistry.qml b/Services/UI/BarWidgetRegistry.qml index 5cd91190..18aeb382 100644 --- a/Services/UI/BarWidgetRegistry.qml +++ b/Services/UI/BarWidgetRegistry.qml @@ -86,7 +86,8 @@ Singleton { "allowUserSettings": true, "useDistroLogo": false, "icon": "noctalia", - "customIconPath": "" + "customIconPath": "", + "colorizeDistroLogo": false }, "CustomButton": { "allowUserSettings": true,