Dock, Tray, ActiveWindow, Taskbar: add theming for app/tray icons

appicon_colorize: create simple shader to colorize icons by theme color
This commit is contained in:
lysec
2025-10-12 17:51:07 +02:00
parent 14af84ffbe
commit 6da4acee09
19 changed files with 236 additions and 5 deletions
@@ -5,12 +5,14 @@ import qs.Commons
import qs.Widgets
ColumnLayout {
id: root
// Properties to receive data from parent
property var widgetData: ({}) // Expected by BarWidgetSettingsDialog
property var widgetMetadata: ({}) // Expected by BarWidgetSettingsDialog
// Local state for the blacklist
// Local state
property var localBlacklist: widgetData.blacklist || []
property bool valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
ListModel {
id: blacklistModel
@@ -27,6 +29,14 @@ ColumnLayout {
spacing: Style.marginM * scaling
NToggle {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.tray.colorize-icons.label")
description: I18n.tr("bar.widget-settings.tray.colorize-icons.description")
checked: root.valueColorizeIcons
onToggled: checked => root.valueColorizeIcons = checked
}
ColumnLayout {
Layout.fillWidth: true
spacing: Style.marginS * scaling
@@ -135,6 +145,7 @@ ColumnLayout {
// Return the updated settings for this widget instance
var settings = Object.assign({}, widgetData || {})
settings.blacklist = newBlacklist
settings.colorizeIcons = root.valueColorizeIcons
return settings
}
}