mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-04 19:26:19 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user