mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-01 18:15:41 +00:00
Merge branch 'main' into qt-scaling
This commit is contained in:
@@ -18,6 +18,7 @@ ColumnLayout {
|
||||
property bool valueAutoHide: widgetData.autoHide !== undefined ? widgetData.autoHide : widgetMetadata.autoHide
|
||||
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
|
||||
property int valueWidth: widgetData.width !== undefined ? widgetData.width : widgetMetadata.width
|
||||
property bool valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
|
||||
|
||||
function saveSettings() {
|
||||
var settings = Object.assign({}, widgetData || {})
|
||||
@@ -25,6 +26,7 @@ ColumnLayout {
|
||||
settings.showIcon = valueShowIcon
|
||||
settings.scrollingMode = valueScrollingMode
|
||||
settings.width = parseInt(widthInput.text) || widgetMetadata.width
|
||||
settings.colorizeIcons = valueColorizeIcons
|
||||
return settings
|
||||
}
|
||||
|
||||
@@ -44,6 +46,14 @@ ColumnLayout {
|
||||
onToggled: checked => root.valueShowIcon = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.active-window.colorize-icons.label")
|
||||
description: I18n.tr("bar.widget-settings.active-window.colorize-icons.description")
|
||||
checked: root.valueColorizeIcons
|
||||
onToggled: checked => root.valueColorizeIcons = checked
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
id: widthInput
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -16,11 +16,13 @@ ColumnLayout {
|
||||
// Local state
|
||||
property bool valueOnlyActiveWorkspaces: widgetData.onlyActiveWorkspaces !== undefined ? widgetData.onlyActiveWorkspaces : widgetMetadata.onlyActiveWorkspaces
|
||||
property bool valueOnlySameOutput: widgetData.onlySameOutput !== undefined ? widgetData.onlySameOutput : widgetMetadata.onlySameOutput
|
||||
property bool valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
|
||||
|
||||
function saveSettings() {
|
||||
var settings = Object.assign({}, widgetData || {})
|
||||
settings.onlySameOutput = valueOnlySameOutput
|
||||
settings.onlyActiveWorkspaces = valueOnlyActiveWorkspaces
|
||||
settings.colorizeIcons = valueColorizeIcons
|
||||
return settings
|
||||
}
|
||||
|
||||
@@ -39,4 +41,12 @@ ColumnLayout {
|
||||
checked: root.valueOnlyActiveWorkspaces
|
||||
onToggled: checked => root.valueOnlyActiveWorkspaces = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.taskbar.colorize-icons.label")
|
||||
description: I18n.tr("bar.widget-settings.taskbar.colorize-icons.description")
|
||||
checked: root.valueColorizeIcons
|
||||
onToggled: checked => root.valueColorizeIcons = checked
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
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
|
||||
@@ -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