Merge branch 'main' into qt-scaling

This commit is contained in:
ItsLemmy
2025-10-12 18:27:56 -04:00
27 changed files with 600 additions and 241 deletions
@@ -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
}
}
+14
View File
@@ -93,6 +93,20 @@ ColumnLayout {
Layout.bottomMargin: Style.marginXL
}
NToggle {
Layout.fillWidth: true
label: I18n.tr("settings.dock.appearance.colorize-icons.label")
description: I18n.tr("settings.dock.appearance.colorize-icons.description")
checked: Settings.data.dock.colorizeIcons
onToggled: checked => Settings.data.dock.colorizeIcons = checked
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL
Layout.bottomMargin: Style.marginXL
}
// Monitor Configuration
ColumnLayout {
spacing: Style.marginM
+4 -4
View File
@@ -21,9 +21,9 @@ ColumnLayout {
// Avatar preview
NImageCircled {
width: 108
height: 108
imagePath: Settings.data.general.avatarImage
width: 108 * Style.uiScaleRatio
height: 108 * Style.uiScaleRatio
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM)
@@ -50,7 +50,7 @@ ColumnLayout {
id: avatarPicker
title: I18n.tr("settings.general.profile.select-avatar")
selectionMode: "files"
initialPath: Settings.data.general.avatarImage.substr(0, Settings.data.general.avatarImage.lastIndexOf("/")) || Quickshell.env("HOME")
initialPath: Settings.preprocessPath(Settings.data.general.avatarImage).substr(0, Settings.preprocessPath(Settings.data.general.avatarImage).lastIndexOf("/")) || Quickshell.env("HOME")
nameFilters: ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.bmp"]
onAccepted: paths => {
if (paths.length > 0) {