From 952e5ecbdecdce79335aad6acf7bdadbfe2a233e Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Tue, 11 Nov 2025 23:25:36 +0800 Subject: [PATCH 01/14] SystemMonitor: add warning and critical state indicators for CPU, temperature, and memory --- Modules/Bar/Widgets/SystemMonitor.qml | 138 +++++++++++++++++++++++--- 1 file changed, 123 insertions(+), 15 deletions(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index caab8fda..5cc6a79c 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -52,6 +52,14 @@ Rectangle { readonly property int memTextWidth: Math.ceil(memMetrics.boundingRect.width + 3) readonly property color textColor: usePrimaryColor ? Color.mPrimary : Color.mOnSurface + // Warning threshold calculation properties + readonly property bool cpuWarning: showCpuUsage && SystemStatService.cpuUsage > 80 + readonly property bool cpuCritical: showCpuUsage && SystemStatService.cpuUsage > 90 + readonly property bool tempWarning: showCpuTemp && SystemStatService.cpuTemp > 80 + readonly property bool tempCritical: showCpuTemp && SystemStatService.cpuTemp > 90 + readonly property bool memWarning: showMemoryUsage && SystemStatService.memPercent > 80 + readonly property bool memCritical: showMemoryUsage && SystemStatService.memPercent > 90 + TextMetrics { id: percentMetrics font.family: Settings.data.ui.fontFixed @@ -82,6 +90,38 @@ Rectangle { radius: Style.radiusM color: Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent + // Status indicator component definition + Component { + id: statusIndicatorComponent + + Rectangle { + id: statusIndicator + property bool warning: false + property bool critical: false + property int indicatorWidth: Style.capsuleHeight + + width: isVertical ? Math.max(0, indicatorWidth - Style.marginS * 2) : Math.max(0, indicatorWidth + Style.marginXS * 2) + height: isVertical ? Math.max(0, Style.capsuleHeight + Style.marginXS * 2) : Math.max(0, Style.capsuleHeight - Style.marginS * 2) + radius: Math.min(width, height) / 2 + color: critical ? Color.mError : Color.mPrimary + scale: (warning || critical) ? 1.0 : 0.0 + opacity: (warning || critical) ? 1.0 : 0.0 + + // Smooth appearance/disappearance animation + Behavior on scale { + NumberAnimation { duration: Style.animationNormal; easing.type: Easing.OutCubic } + } + + Behavior on opacity { + NumberAnimation { duration: Style.animationNormal; easing.type: Easing.OutCubic } + } + + Behavior on color { + ColorAnimation { duration: Style.animationNormal; easing.type: Easing.OutCubic } + } + } + } + GridLayout { id: mainGrid anchors.centerIn: parent @@ -93,11 +133,24 @@ Rectangle { // CPU Usage Component Item { + id: cpuUsageContainer Layout.preferredWidth: isVertical ? root.width : iconSize + percentTextWidth + (Style.marginXXS) Layout.preferredHeight: Style.capsuleHeight Layout.alignment: isVertical ? Qt.AlignHCenter : Qt.AlignVCenter visible: showCpuUsage + // Status indicator covering the entire component + Loader { + sourceComponent: statusIndicatorComponent + anchors.centerIn: parent + + onLoaded: { + item.warning = Qt.binding(() => cpuWarning) + item.critical = Qt.binding(() => cpuCritical) + item.indicatorWidth = Qt.binding(() => cpuUsageContainer.width) + } + } + GridLayout { id: cpuUsageContent anchors.centerIn: parent @@ -107,13 +160,21 @@ Rectangle { rowSpacing: Style.marginXXS columnSpacing: Style.marginXXS - NIcon { - icon: "cpu-usage" - pointSize: iconSize - applyUiScale: false + Item { Layout.alignment: Qt.AlignCenter Layout.row: isVertical ? 1 : 0 Layout.column: 0 + implicitWidth: iconSize + implicitHeight: iconSize + + NIcon { + icon: "cpu-usage" + pointSize: iconSize + applyUiScale: false + anchors.centerIn: parent + // Invert color to bar background when indicator active + color: (cpuWarning || cpuCritical) ? Color.mSurfaceVariant : textColor + } } NText { @@ -133,7 +194,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: textColor + // Invert text color to bar background when indicator active + color: (cpuWarning || cpuCritical) ? Color.mSurfaceVariant : textColor Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -143,11 +205,24 @@ Rectangle { // CPU Temperature Component Item { + id: cpuTempContainer Layout.preferredWidth: isVertical ? root.width : (iconSize + tempTextWidth) + (Style.marginXXS) Layout.preferredHeight: Style.capsuleHeight Layout.alignment: isVertical ? Qt.AlignHCenter : Qt.AlignVCenter visible: showCpuTemp + // Status indicator covering the entire component + Loader { + sourceComponent: statusIndicatorComponent + anchors.centerIn: parent + + onLoaded: { + item.warning = Qt.binding(() => tempWarning) + item.critical = Qt.binding(() => tempCritical) + item.indicatorWidth = Qt.binding(() => cpuTempContainer.width) + } + } + GridLayout { id: cpuTempContent anchors.centerIn: parent @@ -157,13 +232,21 @@ Rectangle { rowSpacing: Style.marginXXS columnSpacing: Style.marginXXS - NIcon { - icon: "cpu-temperature" - pointSize: iconSize - applyUiScale: false + Item { Layout.alignment: Qt.AlignCenter Layout.row: isVertical ? 1 : 0 Layout.column: 0 + implicitWidth: iconSize + implicitHeight: iconSize + + NIcon { + icon: "cpu-temperature" + pointSize: iconSize + applyUiScale: false + anchors.centerIn: parent + // Invert color when temp indicator active + color: (tempWarning || tempCritical) ? Color.mSurfaceVariant : textColor + } } NText { @@ -176,7 +259,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : tempTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: textColor + // Invert text color to bar background when temp indicator active + color: (tempWarning || tempCritical) ? Color.mSurfaceVariant : textColor Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -186,11 +270,24 @@ Rectangle { // Memory Usage Component Item { + id: memoryContainer Layout.preferredWidth: isVertical ? root.width : iconSize + (showMemoryAsPercent ? percentTextWidth : memTextWidth) + (Style.marginXXS) Layout.preferredHeight: Style.capsuleHeight Layout.alignment: isVertical ? Qt.AlignHCenter : Qt.AlignVCenter visible: showMemoryUsage + // Status indicator covering the entire component + Loader { + sourceComponent: statusIndicatorComponent + anchors.centerIn: parent + + onLoaded: { + item.warning = Qt.binding(() => memWarning) + item.critical = Qt.binding(() => memCritical) + item.indicatorWidth = Qt.binding(() => memoryContainer.width) + } + } + GridLayout { id: memoryContent anchors.centerIn: parent @@ -200,13 +297,23 @@ Rectangle { rowSpacing: Style.marginXXS columnSpacing: Style.marginXXS - NIcon { - icon: "memory" - pointSize: iconSize - applyUiScale: false + Item { Layout.alignment: Qt.AlignCenter Layout.row: isVertical ? 1 : 0 Layout.column: 0 + implicitWidth: iconSize + implicitHeight: iconSize + + NIcon { + icon: "memory" + pointSize: iconSize + applyUiScale: false + anchors.centerIn: parent + // Invert color when memory indicator active + color: (memWarning || memCritical) ? Color.mSurfaceVariant : textColor + } + + } NText { @@ -219,7 +326,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : (showMemoryAsPercent ? percentTextWidth : memTextWidth) horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: textColor + // Invert text color to bar background when memory indicator active + color: (memWarning || memCritical) ? Color.mSurfaceVariant : textColor Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 From 84e413f316df50ade8537a5e5ef2c376d21a7a3b Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Wed, 12 Nov 2025 01:08:26 +0800 Subject: [PATCH 02/14] SystemMonitor: add warning and critical state indicators for disk usage --- Modules/Bar/Widgets/SystemMonitor.qml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 5cc6a79c..05575a0f 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -423,11 +423,24 @@ Rectangle { // Disk Usage Component (primary drive) Item { + id: diskContainer Layout.preferredWidth: isVertical ? root.width : iconSize + percentTextWidth + (Style.marginXXS) Layout.preferredHeight: Style.capsuleHeight Layout.alignment: isVertical ? Qt.AlignHCenter : Qt.AlignVCenter visible: showDiskUsage + // Status indicator covering the entire component + Loader { + sourceComponent: statusIndicatorComponent + anchors.centerIn: parent + + onLoaded: { + item.warning = Qt.binding(() => diskWarning) + item.critical = Qt.binding(() => diskCritical) + item.indicatorWidth = Qt.binding(() => diskContainer.width) + } + } + GridLayout { id: diskContent anchors.centerIn: parent @@ -444,6 +457,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.row: isVertical ? 1 : 0 Layout.column: 0 + // Invert color when disk indicator active + color: (diskWarning || diskCritical) ? Color.mSurfaceVariant : textColor } NText { @@ -456,7 +471,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: textColor + // Invert text color to bar background when disk indicator active + color: (diskWarning || diskCritical) ? Color.mSurfaceVariant : textColor Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 From ccbfa926dd56efa27fdf4b3e417e9790de8c0e90 Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Wed, 12 Nov 2025 01:09:05 +0800 Subject: [PATCH 03/14] SystemMonitor: add configurable thresholds for system monitor widget --- Modules/Bar/Widgets/SystemMonitor.qml | 24 +- .../WidgetSettings/SystemMonitorSettings.qml | 228 ++++++++++++++++++ Services/UI/BarWidgetRegistry.qml | 10 +- 3 files changed, 255 insertions(+), 7 deletions(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 05575a0f..d3b9fe8e 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -52,13 +52,25 @@ Rectangle { readonly property int memTextWidth: Math.ceil(memMetrics.boundingRect.width + 3) readonly property color textColor: usePrimaryColor ? Color.mPrimary : Color.mOnSurface + // Threshold settings from widget configuration + readonly property int cpuWarningThreshold: (widgetSettings.cpuWarningThreshold !== undefined) ? widgetSettings.cpuWarningThreshold : widgetMetadata.cpuWarningThreshold + readonly property int cpuCriticalThreshold: (widgetSettings.cpuCriticalThreshold !== undefined) ? widgetSettings.cpuCriticalThreshold : widgetMetadata.cpuCriticalThreshold + readonly property int tempWarningThreshold: (widgetSettings.tempWarningThreshold !== undefined) ? widgetSettings.tempWarningThreshold : widgetMetadata.tempWarningThreshold + readonly property int tempCriticalThreshold: (widgetSettings.tempCriticalThreshold !== undefined) ? widgetSettings.tempCriticalThreshold : widgetMetadata.tempCriticalThreshold + readonly property int memWarningThreshold: (widgetSettings.memWarningThreshold !== undefined) ? widgetSettings.memWarningThreshold : widgetMetadata.memWarningThreshold + readonly property int memCriticalThreshold: (widgetSettings.memCriticalThreshold !== undefined) ? widgetSettings.memCriticalThreshold : widgetMetadata.memCriticalThreshold + readonly property int diskWarningThreshold: (widgetSettings.diskWarningThreshold !== undefined) ? widgetSettings.diskWarningThreshold : widgetMetadata.diskWarningThreshold + readonly property int diskCriticalThreshold: (widgetSettings.diskCriticalThreshold !== undefined) ? widgetSettings.diskCriticalThreshold : widgetMetadata.diskCriticalThreshold + // Warning threshold calculation properties - readonly property bool cpuWarning: showCpuUsage && SystemStatService.cpuUsage > 80 - readonly property bool cpuCritical: showCpuUsage && SystemStatService.cpuUsage > 90 - readonly property bool tempWarning: showCpuTemp && SystemStatService.cpuTemp > 80 - readonly property bool tempCritical: showCpuTemp && SystemStatService.cpuTemp > 90 - readonly property bool memWarning: showMemoryUsage && SystemStatService.memPercent > 80 - readonly property bool memCritical: showMemoryUsage && SystemStatService.memPercent > 90 + readonly property bool cpuWarning: showCpuUsage && SystemStatService.cpuUsage > cpuWarningThreshold + readonly property bool cpuCritical: showCpuUsage && SystemStatService.cpuUsage > cpuCriticalThreshold + readonly property bool tempWarning: showCpuTemp && SystemStatService.cpuTemp > tempWarningThreshold + readonly property bool tempCritical: showCpuTemp && SystemStatService.cpuTemp > tempCriticalThreshold + readonly property bool memWarning: showMemoryUsage && SystemStatService.memPercent > memWarningThreshold + readonly property bool memCritical: showMemoryUsage && SystemStatService.memPercent > memCriticalThreshold + readonly property bool diskWarning: showDiskUsage && SystemStatService.diskPercents["/"] > diskWarningThreshold + readonly property bool diskCritical: showDiskUsage && SystemStatService.diskPercents["/"] > diskCriticalThreshold TextMetrics { id: percentMetrics diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml index 9ca62f78..caad8b03 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml @@ -21,6 +21,16 @@ ColumnLayout { property bool valueShowNetworkStats: widgetData.showNetworkStats !== undefined ? widgetData.showNetworkStats : widgetMetadata.showNetworkStats property bool valueShowDiskUsage: widgetData.showDiskUsage !== undefined ? widgetData.showDiskUsage : widgetMetadata.showDiskUsage + // Threshold settings + property int valueCpuWarningThreshold: widgetData.cpuWarningThreshold !== undefined ? widgetData.cpuWarningThreshold : widgetMetadata.cpuWarningThreshold + property int valueCpuCriticalThreshold: widgetData.cpuCriticalThreshold !== undefined ? widgetData.cpuCriticalThreshold : widgetMetadata.cpuCriticalThreshold + property int valueTempWarningThreshold: widgetData.tempWarningThreshold !== undefined ? widgetData.tempWarningThreshold : widgetMetadata.tempWarningThreshold + property int valueTempCriticalThreshold: widgetData.tempCriticalThreshold !== undefined ? widgetData.tempCriticalThreshold : widgetMetadata.tempCriticalThreshold + property int valueMemWarningThreshold: widgetData.memWarningThreshold !== undefined ? widgetData.memWarningThreshold : widgetMetadata.memWarningThreshold + property int valueMemCriticalThreshold: widgetData.memCriticalThreshold !== undefined ? widgetData.memCriticalThreshold : widgetMetadata.memCriticalThreshold + property int valueDiskWarningThreshold: widgetData.diskWarningThreshold !== undefined ? widgetData.diskWarningThreshold : widgetMetadata.diskWarningThreshold + property int valueDiskCriticalThreshold: widgetData.diskCriticalThreshold !== undefined ? widgetData.diskCriticalThreshold : widgetMetadata.diskCriticalThreshold + function saveSettings() { var settings = Object.assign({}, widgetData || {}) settings.usePrimaryColor = valueUsePrimaryColor @@ -30,6 +40,14 @@ ColumnLayout { settings.showMemoryAsPercent = valueShowMemoryAsPercent settings.showNetworkStats = valueShowNetworkStats settings.showDiskUsage = valueShowDiskUsage + settings.cpuWarningThreshold = valueCpuWarningThreshold + settings.cpuCriticalThreshold = valueCpuCriticalThreshold + settings.tempWarningThreshold = valueTempWarningThreshold + settings.tempCriticalThreshold = valueTempCriticalThreshold + settings.memWarningThreshold = valueMemWarningThreshold + settings.memCriticalThreshold = valueMemCriticalThreshold + settings.diskWarningThreshold = valueDiskWarningThreshold + settings.diskCriticalThreshold = valueDiskCriticalThreshold return settings } @@ -95,4 +113,214 @@ ColumnLayout { checked: valueShowDiskUsage onToggled: checked => valueShowDiskUsage = checked } + + NDivider { + Layout.fillWidth: true + Layout.topMargin: Style.marginM + Layout.bottomMargin: Style.marginM + } + + NHeader { + Layout.fillWidth: true + label: I18n.tr("bar.widget-settings.system-monitor.thresholds.header") + description: I18n.tr("bar.widget-settings.system-monitor.thresholds.description") + } + + // CPU Usage Thresholds + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + visible: valueShowCpuUsage + + // Warning threshold + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.cpu-warning-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueCpuWarningThreshold + onValueChanged: valueCpuWarningThreshold = value + suffix: "%" + } + } + + // Critical threshold + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.cpu-critical-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueCpuCriticalThreshold + onValueChanged: valueCpuCriticalThreshold = value + suffix: "%" + } + } + } + + // Temperature Thresholds + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + visible: valueShowCpuTemp + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.temp-warning-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueTempWarningThreshold + onValueChanged: valueTempWarningThreshold = value + suffix: "°C" + } + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.temp-critical-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueTempCriticalThreshold + onValueChanged: valueTempCriticalThreshold = value + suffix: "°C" + } + } + } + + // Memory Usage Thresholds + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + visible: valueShowMemoryUsage + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.mem-warning-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueMemWarningThreshold + onValueChanged: valueMemWarningThreshold = value + suffix: "%" + } + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.mem-critical-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueMemCriticalThreshold + onValueChanged: valueMemCriticalThreshold = value + suffix: "%" + } + } + } + + // Storage Space Thresholds + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + visible: valueShowDiskUsage + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.disk-warning-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueDiskWarningThreshold + onValueChanged: valueDiskWarningThreshold = value + suffix: "%" + } + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginXS + + NText { + text: I18n.tr("bar.widget-settings.system-monitor.disk-critical-threshold.label") + pointSize: Style.fontSizeS + Layout.alignment: Qt.AlignVCenter + } + + NSpinBox { + Layout.fillWidth: true + from: 0 + to: 100 + stepSize: 5 + value: valueDiskCriticalThreshold + onValueChanged: valueDiskCriticalThreshold = value + suffix: "%" + } + } + } } diff --git a/Services/UI/BarWidgetRegistry.qml b/Services/UI/BarWidgetRegistry.qml index b5632bad..6e9c6cc0 100644 --- a/Services/UI/BarWidgetRegistry.qml +++ b/Services/UI/BarWidgetRegistry.qml @@ -147,7 +147,15 @@ Singleton { "showMemoryUsage": true, "showMemoryAsPercent": false, "showNetworkStats": false, - "showDiskUsage": false + "showDiskUsage": false, + "cpuWarningThreshold": 80, + "cpuCriticalThreshold": 90, + "tempWarningThreshold": 80, + "tempCriticalThreshold": 90, + "memWarningThreshold": 80, + "memCriticalThreshold": 90, + "diskWarningThreshold": 80, + "diskCriticalThreshold": 90 }, "Taskbar": { "allowUserSettings": true, From f616aa64c564e3852acff850c5b97d6844878f20 Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Wed, 12 Nov 2025 11:07:07 +0800 Subject: [PATCH 04/14] i18n: add ai translations for system monitor threshold highlighting - Added threshold settings for visual indicators in German, English, Spanish, French, Portuguese, Russian, Turkish, Ukrainian, and Chinese. --- Assets/Translations/de.json | 32 ++++++++++++++++++++++++++++++-- Assets/Translations/en.json | 30 +++++++++++++++++++++++++++++- Assets/Translations/es.json | 30 +++++++++++++++++++++++++++++- Assets/Translations/fr.json | 30 +++++++++++++++++++++++++++++- Assets/Translations/pt.json | 30 +++++++++++++++++++++++++++++- Assets/Translations/ru.json | 28 ++++++++++++++++++++++++++++ Assets/Translations/tr.json | 30 +++++++++++++++++++++++++++++- Assets/Translations/uk-UA.json | 30 +++++++++++++++++++++++++++++- Assets/Translations/zh-CN.json | 30 +++++++++++++++++++++++++++++- 9 files changed, 261 insertions(+), 9 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 0650ce55..a91a7df0 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -132,7 +132,7 @@ "label": "Symbol" }, "left-click": { - "description": "Befehl, der ausgeführt wird, wenn die Schaltfläche links angeklickt wird.", + "description": "Befehl, der ausgeführt wird, wenn die Schaltfläche mit der linken Maustaste angeklickt wird.", "label": "Linksklick" }, "middle-click": { @@ -262,6 +262,34 @@ "storage-usage": { "description": "Festplattenspeicher-Nutzungsinformationen anzeigen.", "label": "Speichernutzung" + }, + "thresholds": { + "header": "Schwellenwerte", + "description": "Schwellenwerte für visuelle Indikatoren konfigurieren. Warn-/Kritik-Indikatoren erscheinen in hervorgehobenen Farben bei Überschreitung." + }, + "cpu-warning-threshold": { + "label": "CPU-Auslastung (Warnung)" + }, + "cpu-critical-threshold": { + "label": "CPU-Auslastung (Kritisch)" + }, + "temp-warning-threshold": { + "label": "CPU-Temperatur (Warnung)" + }, + "temp-critical-threshold": { + "label": "CPU-Temperatur (Kritisch)" + }, + "mem-warning-threshold": { + "label": "Speicherverbrauch (Warnung)" + }, + "mem-critical-threshold": { + "label": "Speicherverbrauch (Kritisch)" + }, + "disk-warning-threshold": { + "label": "Speicherplatz (Warnung)" + }, + "disk-critical-threshold": { + "label": "Speicherplatz (Kritisch)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "WLAN" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 7901eef4..2228ec51 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "Show disk space usage information.", "label": "Storage usage" + }, + "thresholds": { + "header": "Threshold Settings", + "description": "Set thresholds for system metric alerts. Highlights when exceeded." + }, + "cpu-warning-threshold": { + "label": "CPU Usage (Warning)" + }, + "cpu-critical-threshold": { + "label": "CPU Usage (Critical)" + }, + "temp-warning-threshold": { + "label": "CPU Temperature (Warning)" + }, + "temp-critical-threshold": { + "label": "CPU Temperature (Critical)" + }, + "mem-warning-threshold": { + "label": "Memory Usage (Warning)" + }, + "mem-critical-threshold": { + "label": "Memory Usage (Critical)" + }, + "disk-warning-threshold": { + "label": "Storage Space (Warning)" + }, + "disk-critical-threshold": { + "label": "Storage Space (Critical)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 72b0ddc5..0f65d507 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "Mostrar información del uso del espacio en disco.", "label": "Uso de almacenamiento" + }, + "thresholds": { + "header": "Configuración de Umbrales", + "description": "Establece umbrales para alertas de métricas del sistema. Resalta cuando se superan." + }, + "cpu-warning-threshold": { + "label": "Uso de CPU (Advertencia)" + }, + "cpu-critical-threshold": { + "label": "Uso de CPU (Crítico)" + }, + "temp-warning-threshold": { + "label": "Temperatura de CPU (Advertencia)" + }, + "temp-critical-threshold": { + "label": "Temperatura de CPU (Crítico)" + }, + "mem-warning-threshold": { + "label": "Uso de memoria (Advertencia)" + }, + "mem-critical-threshold": { + "label": "Uso de memoria (Crítico)" + }, + "disk-warning-threshold": { + "label": "Espacio de almacenamiento (Advertencia)" + }, + "disk-critical-threshold": { + "label": "Espacio de almacenamiento (Crítico)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 15ee667c..baf0f4e9 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "Afficher les informations d'utilisation de l'espace disque.", "label": "Utilisation du stockage" + }, + "thresholds": { + "header": "Seuils", + "description": "Configurez les seuils des indicateurs visuels. Les indicateurs d'avertissement/critique apparaissent en couleurs mises en surbrillance lorsque les valeurs dépassent ces limites." + }, + "cpu-warning-threshold": { + "label": "Utilisation CPU (Avertissement)" + }, + "cpu-critical-threshold": { + "label": "Utilisation CPU (Critique)" + }, + "temp-warning-threshold": { + "label": "Température CPU (Avertissement)" + }, + "temp-critical-threshold": { + "label": "Température CPU (Critique)" + }, + "mem-warning-threshold": { + "label": "Utilisation mémoire (Avertissement)" + }, + "mem-critical-threshold": { + "label": "Utilisation mémoire (Critique)" + }, + "disk-warning-threshold": { + "label": "Espace disque (Avertissement)" + }, + "disk-critical-threshold": { + "label": "Espace disque (Critique)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 0d4348bd..f86d8782 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "Mostrar informações de uso do espaço em disco.", "label": "Uso de armazenamento" + }, + "thresholds": { + "header": "Configuração de Limiares", + "description": "Estabelece limites para alertas de métricas do sistema. Destaca quando superados." + }, + "cpu-warning-threshold": { + "label": "Uso da CPU (Aviso)" + }, + "cpu-critical-threshold": { + "label": "Uso da CPU (Crítico)" + }, + "temp-warning-threshold": { + "label": "Temperatura da CPU (Aviso)" + }, + "temp-critical-threshold": { + "label": "Temperatura da CPU (Crítico)" + }, + "mem-warning-threshold": { + "label": "Uso da memória (Aviso)" + }, + "mem-critical-threshold": { + "label": "Uso da memória (Crítico)" + }, + "disk-warning-threshold": { + "label": "Espaço de armazenamento (Aviso)" + }, + "disk-critical-threshold": { + "label": "Espaço de armazenamento (Crítico)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 3d22d94a..ecb2538a 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "Показывать информацию об использовании дискового пространства.", "label": "Использование хранилища" + }, + "thresholds": { + "header": "Пороговые значения", + "description": "Установите пороги для оповещений системных метрик. Выделяет при превышении." + }, + "cpu-warning-threshold": { + "label": "Загрузка ЦП (Предупреждение)" + }, + "cpu-critical-threshold": { + "label": "Загрузка ЦП (Критический)" + }, + "temp-warning-threshold": { + "label": "Температура ЦП (Предупреждение)" + }, + "temp-critical-threshold": { + "label": "Температура ЦП (Критический)" + }, + "mem-warning-threshold": { + "label": "Использование памяти (Предупреждение)" + }, + "mem-critical-threshold": { + "label": "Использование памяти (Критический)" + }, + "disk-warning-threshold": { + "label": "Место на диске (Предупреждение)" + }, + "disk-critical-threshold": { + "label": "Место на диске (Критический)" } }, "taskbar": { diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index fc7639ce..b0225082 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "Disk alanı kullanım bilgilerini göster.", "label": "Depolama kullanımı" + }, + "thresholds": { + "header": "Eşik Ayarları", + "description": "Sistem metrik eşiklerini ayarlayın. Aşıldığında vurgular." + }, + "cpu-warning-threshold": { + "label": "CPU Kullanımı (Uyarı)" + }, + "cpu-critical-threshold": { + "label": "CPU Kullanımı (Kritik)" + }, + "temp-warning-threshold": { + "label": "CPU Sıcaklığı (Uyarı)" + }, + "temp-critical-threshold": { + "label": "CPU Sıcaklığı (Kritik)" + }, + "mem-warning-threshold": { + "label": "Bellek Kullanımı (Uyarı)" + }, + "mem-critical-threshold": { + "label": "Bellek Kullanımı (Kritik)" + }, + "disk-warning-threshold": { + "label": "Depolama Alanı (Uyarı)" + }, + "disk-critical-threshold": { + "label": "Depolama Alanı (Kritik)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 542a4836..aa80412d 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "Показувати інформацію про використання дискового простору.", "label": "Використання сховища" + }, + "thresholds": { + "header": "Налаштування порогів", + "description": "Встановіть пороги для оповіщень системних метрик. Виділяє при перевищенні." + }, + "cpu-warning-threshold": { + "label": "Використання ЦП (Попередження)" + }, + "cpu-critical-threshold": { + "label": "Використання ЦП (Критичний)" + }, + "temp-warning-threshold": { + "label": "Температура ЦП (Попередження)" + }, + "temp-critical-threshold": { + "label": "Температура ЦП (Критичний)" + }, + "mem-warning-threshold": { + "label": "Використання пам'яті (Попередження)" + }, + "mem-critical-threshold": { + "label": "Використання пам'яті (Критичний)" + }, + "disk-warning-threshold": { + "label": "Місце на диску (Попередження)" + }, + "disk-critical-threshold": { + "label": "Місце на диску (Критичний)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 8a9e227d..0761ad22 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -262,6 +262,34 @@ "storage-usage": { "description": "显示磁盘空间使用信息。", "label": "存储使用率" + }, + "thresholds": { + "header": "阈值设置", + "description": "配置系统指标提示的阈值,超出阈值时将以高亮色进行提示。" + }, + "cpu-warning-threshold": { + "label": "CPU 使用率(警告)" + }, + "cpu-critical-threshold": { + "label": "CPU 使用率(严重)" + }, + "temp-warning-threshold": { + "label": "CPU 温度(警告)" + }, + "temp-critical-threshold": { + "label": "CPU 温度(严重)" + }, + "mem-warning-threshold": { + "label": "内存使用率(警告)" + }, + "mem-critical-threshold": { + "label": "内存使用率(严重)" + }, + "disk-warning-threshold": { + "label": "存储空间(警告)" + }, + "disk-critical-threshold": { + "label": "存储空间(严重)" } }, "taskbar": { @@ -2016,4 +2044,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file From fa880e8390cdb24a9e4467da3b9542d00bb974ad Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Wed, 12 Nov 2025 13:22:29 +0800 Subject: [PATCH 05/14] SystemMonitor: restore metrics' icon color --- Modules/Bar/Widgets/SystemMonitor.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index d3b9fe8e..fd74e770 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -185,7 +185,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color to bar background when indicator active - color: (cpuWarning || cpuCritical) ? Color.mSurfaceVariant : textColor + color: (cpuWarning || cpuCritical) ? Color.mSurfaceVariant : Color.mOnSurface } } @@ -257,7 +257,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color when temp indicator active - color: (tempWarning || tempCritical) ? Color.mSurfaceVariant : textColor + color: (tempWarning || tempCritical) ? Color.mSurfaceVariant : Color.mOnSurface } } @@ -322,7 +322,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color when memory indicator active - color: (memWarning || memCritical) ? Color.mSurfaceVariant : textColor + color: (memWarning || memCritical) ? Color.mSurfaceVariant : Color.mOnSurface } @@ -470,7 +470,7 @@ Rectangle { Layout.row: isVertical ? 1 : 0 Layout.column: 0 // Invert color when disk indicator active - color: (diskWarning || diskCritical) ? Color.mSurfaceVariant : textColor + color: (diskWarning || diskCritical) ? Color.mSurfaceVariant : Color.mOnSurface } NText { From be780971d63d99bdb03e69d9da90775523f36d8d Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Wed, 12 Nov 2025 13:28:17 +0800 Subject: [PATCH 06/14] SystemMonitor: ensure critical thresholds are not less than warning thresholds --- .../Bar/WidgetSettings/SystemMonitorSettings.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml index caad8b03..adc464fc 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml @@ -48,6 +48,20 @@ ColumnLayout { settings.memCriticalThreshold = valueMemCriticalThreshold settings.diskWarningThreshold = valueDiskWarningThreshold settings.diskCriticalThreshold = valueDiskCriticalThreshold + // Ensure critical thresholds are not less than their warning counterparts. + if (settings.cpuCriticalThreshold < settings.cpuWarningThreshold) { + settings.cpuCriticalThreshold = Math.min(100, settings.cpuWarningThreshold) + } + if (settings.tempCriticalThreshold < settings.tempWarningThreshold) { + settings.tempCriticalThreshold = Math.min(100, settings.tempWarningThreshold) + } + if (settings.memCriticalThreshold < settings.memWarningThreshold) { + settings.memCriticalThreshold = Math.min(100, settings.memWarningThreshold) + } + if (settings.diskCriticalThreshold < settings.diskWarningThreshold) { + settings.diskCriticalThreshold = Math.min(100, settings.diskWarningThreshold) + } + return settings } From 12a4fe2653886f86dc67824c071745b3dca5f0d9 Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Thu, 13 Nov 2025 10:18:57 +0800 Subject: [PATCH 07/14] SystemMonitor: change metrics highlighting method on vertical bar to text highlighting --- Modules/Bar/Widgets/SystemMonitor.qml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index fd74e770..44adf1b0 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -115,6 +115,8 @@ Rectangle { width: isVertical ? Math.max(0, indicatorWidth - Style.marginS * 2) : Math.max(0, indicatorWidth + Style.marginXS * 2) height: isVertical ? Math.max(0, Style.capsuleHeight + Style.marginXS * 2) : Math.max(0, Style.capsuleHeight - Style.marginS * 2) radius: Math.min(width, height) / 2 + // Hide the rectangular indicator when the bar is vertical; keep it available for horizontal layout + visible: !root.isVertical color: critical ? Color.mError : Color.mPrimary scale: (warning || critical) ? 1.0 : 0.0 opacity: (warning || critical) ? 1.0 : 0.0 @@ -185,7 +187,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color to bar background when indicator active - color: (cpuWarning || cpuCritical) ? Color.mSurfaceVariant : Color.mOnSurface + color: isVertical ? (cpuCritical ? Color.mError : (cpuWarning ? Color.mPrimary : Color.mOnSurface)) : ((cpuWarning || cpuCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } } @@ -206,8 +208,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Invert text color to bar background when indicator active - color: (cpuWarning || cpuCritical) ? Color.mSurfaceVariant : textColor + // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when indicator active + color: isVertical ? (cpuCritical ? Color.mError : (cpuWarning ? Color.mPrimary : textColor)) : ((cpuWarning || cpuCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -257,7 +259,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color when temp indicator active - color: (tempWarning || tempCritical) ? Color.mSurfaceVariant : Color.mOnSurface + color: isVertical ? (tempCritical ? Color.mError : (tempWarning ? Color.mPrimary : Color.mOnSurface)) : ((tempWarning || tempCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } } @@ -271,8 +273,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : tempTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Invert text color to bar background when temp indicator active - color: (tempWarning || tempCritical) ? Color.mSurfaceVariant : textColor + // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when temp indicator active + color: isVertical ? (tempCritical ? Color.mError : (tempWarning ? Color.mPrimary : textColor)) : ((tempWarning || tempCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -322,7 +324,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color when memory indicator active - color: (memWarning || memCritical) ? Color.mSurfaceVariant : Color.mOnSurface + color: isVertical ? (memCritical ? Color.mError : (memWarning ? Color.mPrimary : Color.mOnSurface)) : ((memWarning || memCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } @@ -338,8 +340,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : (showMemoryAsPercent ? percentTextWidth : memTextWidth) horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Invert text color to bar background when memory indicator active - color: (memWarning || memCritical) ? Color.mSurfaceVariant : textColor + // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when memory indicator active + color: isVertical ? (memCritical ? Color.mError : (memWarning ? Color.mPrimary : textColor)) : ((memWarning || memCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -470,7 +472,7 @@ Rectangle { Layout.row: isVertical ? 1 : 0 Layout.column: 0 // Invert color when disk indicator active - color: (diskWarning || diskCritical) ? Color.mSurfaceVariant : Color.mOnSurface + color: isVertical ? (diskCritical ? Color.mError : (diskWarning ? Color.mPrimary : Color.mOnSurface)) : ((diskWarning || diskCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } NText { @@ -483,8 +485,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Invert text color to bar background when disk indicator active - color: (diskWarning || diskCritical) ? Color.mSurfaceVariant : textColor + // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when disk indicator active + color: isVertical ? (diskCritical ? Color.mError : (diskWarning ? Color.mPrimary : textColor)) : ((diskWarning || diskCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 From f067d585b56ac3d683a3edbed2d653349ea8369b Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Thu, 13 Nov 2025 10:26:00 +0800 Subject: [PATCH 08/14] SystemMonitor: align the height of horizontal bar highlight rectangles with the pill of the Workspace --- Modules/Bar/Widgets/SystemMonitor.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 44adf1b0..3a39e78b 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -47,6 +47,10 @@ Rectangle { return Math.max(1, (density === "compact") ? base * 0.43 : base * 0.33) } + // Match Workspace widget pill sizing: base ratio depends on bar density + readonly property real pillBaseRatio: (density === "compact") ? 0.85 : 0.65 + readonly property real pillHeight: Style.capsuleHeight * pillBaseRatio + readonly property int percentTextWidth: Math.ceil(percentMetrics.boundingRect.width + 3) readonly property int tempTextWidth: Math.ceil(tempMetrics.boundingRect.width + 3) readonly property int memTextWidth: Math.ceil(memMetrics.boundingRect.width + 3) @@ -113,7 +117,7 @@ Rectangle { property int indicatorWidth: Style.capsuleHeight width: isVertical ? Math.max(0, indicatorWidth - Style.marginS * 2) : Math.max(0, indicatorWidth + Style.marginXS * 2) - height: isVertical ? Math.max(0, Style.capsuleHeight + Style.marginXS * 2) : Math.max(0, Style.capsuleHeight - Style.marginS * 2) + height: isVertical ? Math.max(0, Style.capsuleHeight + Style.marginXS * 2) : pillHeight radius: Math.min(width, height) / 2 // Hide the rectangular indicator when the bar is vertical; keep it available for horizontal layout visible: !root.isVertical From 58ee164792c325a65485d96f43ff49b34244a2ff Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Thu, 13 Nov 2025 12:00:29 +0800 Subject: [PATCH 09/14] SystemMonitor: unify highlight colors, change warning color to mTertiary --- Modules/Bar/Widgets/SystemMonitor.qml | 32 +++++++++++++++------------ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 3a39e78b..f1d512dd 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -51,6 +51,10 @@ Rectangle { readonly property real pillBaseRatio: (density === "compact") ? 0.85 : 0.65 readonly property real pillHeight: Style.capsuleHeight * pillBaseRatio + // Highlight colors + readonly property color warningColor: Color.mTertiary + readonly property color criticalColor: Color.mError + readonly property int percentTextWidth: Math.ceil(percentMetrics.boundingRect.width + 3) readonly property int tempTextWidth: Math.ceil(tempMetrics.boundingRect.width + 3) readonly property int memTextWidth: Math.ceil(memMetrics.boundingRect.width + 3) @@ -121,7 +125,7 @@ Rectangle { radius: Math.min(width, height) / 2 // Hide the rectangular indicator when the bar is vertical; keep it available for horizontal layout visible: !root.isVertical - color: critical ? Color.mError : Color.mPrimary + color: critical ? Color.mError : Color.mTertiary scale: (warning || critical) ? 1.0 : 0.0 opacity: (warning || critical) ? 1.0 : 0.0 @@ -191,7 +195,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color to bar background when indicator active - color: isVertical ? (cpuCritical ? Color.mError : (cpuWarning ? Color.mPrimary : Color.mOnSurface)) : ((cpuWarning || cpuCritical) ? Color.mSurfaceVariant : Color.mOnSurface) + color: isVertical ? (cpuCritical ? criticalColor : (cpuWarning ? warningColor : Color.mOnSurface)) : ((cpuWarning || cpuCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } } @@ -212,8 +216,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when indicator active - color: isVertical ? (cpuCritical ? Color.mError : (cpuWarning ? Color.mPrimary : textColor)) : ((cpuWarning || cpuCritical) ? Color.mSurfaceVariant : textColor) + // Use highlight colors in vertical bar; otherwise invert text color to bar background when indicator active + color: isVertical ? (cpuCritical ? criticalColor : (cpuWarning ? warningColor : textColor)) : ((cpuWarning || cpuCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -263,7 +267,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color when temp indicator active - color: isVertical ? (tempCritical ? Color.mError : (tempWarning ? Color.mPrimary : Color.mOnSurface)) : ((tempWarning || tempCritical) ? Color.mSurfaceVariant : Color.mOnSurface) + color: isVertical ? (tempCritical ? criticalColor : (tempWarning ? warningColor : Color.mOnSurface)) : ((tempWarning || tempCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } } @@ -277,8 +281,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : tempTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when temp indicator active - color: isVertical ? (tempCritical ? Color.mError : (tempWarning ? Color.mPrimary : textColor)) : ((tempWarning || tempCritical) ? Color.mSurfaceVariant : textColor) + // Use highlight colors in vertical bar; otherwise invert text color to bar background when temp indicator active + color: isVertical ? (tempCritical ? criticalColor : (tempWarning ? warningColor : textColor)) : ((tempWarning || tempCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -328,7 +332,7 @@ Rectangle { applyUiScale: false anchors.centerIn: parent // Invert color when memory indicator active - color: isVertical ? (memCritical ? Color.mError : (memWarning ? Color.mPrimary : Color.mOnSurface)) : ((memWarning || memCritical) ? Color.mSurfaceVariant : Color.mOnSurface) + color: isVertical ? (memCritical ? criticalColor : (memWarning ? warningColor : Color.mOnSurface)) : ((memWarning || memCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } @@ -344,8 +348,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : (showMemoryAsPercent ? percentTextWidth : memTextWidth) horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when memory indicator active - color: isVertical ? (memCritical ? Color.mError : (memWarning ? Color.mPrimary : textColor)) : ((memWarning || memCritical) ? Color.mSurfaceVariant : textColor) + // Use highlight colors in vertical bar; otherwise invert text color to bar background when memory indicator active + color: isVertical ? (memCritical ? criticalColor : (memWarning ? warningColor : textColor)) : ((memWarning || memCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 @@ -475,8 +479,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.row: isVertical ? 1 : 0 Layout.column: 0 - // Invert color when disk indicator active - color: isVertical ? (diskCritical ? Color.mError : (diskWarning ? Color.mPrimary : Color.mOnSurface)) : ((diskWarning || diskCritical) ? Color.mSurfaceVariant : Color.mOnSurface) + // Invert color when disk indicator active (vertical uses highlight colors) + color: isVertical ? (diskCritical ? criticalColor : (diskWarning ? warningColor : Color.mOnSurface)) : ((diskWarning || diskCritical) ? Color.mSurfaceVariant : Color.mOnSurface) } NText { @@ -489,8 +493,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - // Use warning/critical colors in vertical bar; otherwise invert text color to bar background when disk indicator active - color: isVertical ? (diskCritical ? Color.mError : (diskWarning ? Color.mPrimary : textColor)) : ((diskWarning || diskCritical) ? Color.mSurfaceVariant : textColor) + // Use highlight colors in vertical bar; otherwise invert text color to bar background when disk indicator active + color: isVertical ? (diskCritical ? criticalColor : (diskWarning ? warningColor : textColor)) : ((diskWarning || diskCritical) ? Color.mSurfaceVariant : textColor) Layout.row: isVertical ? 0 : 0 Layout.column: isVertical ? 0 : 1 scale: isVertical ? Math.min(1.0, root.width / implicitWidth) : 1.0 From 4b2e8b6ef04de014dd0191263fa106d86455807c Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Fri, 14 Nov 2025 17:18:23 +0800 Subject: [PATCH 10/14] SystemMonitor: transfer system monitor threshold settings to gloabal setting tab --- Assets/settings-default.json | 10 + Commons/Settings.qml | 12 + Modules/Bar/Widgets/SystemMonitor.qml | 18 +- .../WidgetSettings/SystemMonitorSettings.qml | 241 ------------------ Modules/Panels/Settings/SettingsPanel.qml | 13 +- .../Panels/Settings/Tabs/SystemMonitorTab.qml | 230 ++++++++++++++++- Services/UI/BarWidgetRegistry.qml | 10 +- 7 files changed, 264 insertions(+), 270 deletions(-) diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 320adebc..a18fd1de 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -107,6 +107,16 @@ "audioSource": "default_output", "videoSource": "portal" }, + "systemMonitor": { + "cpuWarningThreshold": 80, + "cpuCriticalThreshold": 90, + "tempWarningThreshold": 80, + "tempCriticalThreshold": 90, + "memWarningThreshold": 80, + "memCriticalThreshold": 90, + "diskWarningThreshold": 80, + "diskCriticalThreshold": 90 + }, "wallpaper": { "enabled": true, "overviewEnabled": false, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 43e04798..c5be9107 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -321,6 +321,18 @@ Singleton { }] } + // system monitor + property JsonObject systemMonitor: JsonObject { + property int cpuWarningThreshold: 80 + property int cpuCriticalThreshold: 90 + property int tempWarningThreshold: 80 + property int tempCriticalThreshold: 90 + property int memWarningThreshold: 80 + property int memCriticalThreshold: 90 + property int diskWarningThreshold: 80 + property int diskCriticalThreshold: 90 + } + // dock property JsonObject dock: JsonObject { property bool enabled: true diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index f1d512dd..8bf78ba3 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -60,15 +60,15 @@ Rectangle { readonly property int memTextWidth: Math.ceil(memMetrics.boundingRect.width + 3) readonly property color textColor: usePrimaryColor ? Color.mPrimary : Color.mOnSurface - // Threshold settings from widget configuration - readonly property int cpuWarningThreshold: (widgetSettings.cpuWarningThreshold !== undefined) ? widgetSettings.cpuWarningThreshold : widgetMetadata.cpuWarningThreshold - readonly property int cpuCriticalThreshold: (widgetSettings.cpuCriticalThreshold !== undefined) ? widgetSettings.cpuCriticalThreshold : widgetMetadata.cpuCriticalThreshold - readonly property int tempWarningThreshold: (widgetSettings.tempWarningThreshold !== undefined) ? widgetSettings.tempWarningThreshold : widgetMetadata.tempWarningThreshold - readonly property int tempCriticalThreshold: (widgetSettings.tempCriticalThreshold !== undefined) ? widgetSettings.tempCriticalThreshold : widgetMetadata.tempCriticalThreshold - readonly property int memWarningThreshold: (widgetSettings.memWarningThreshold !== undefined) ? widgetSettings.memWarningThreshold : widgetMetadata.memWarningThreshold - readonly property int memCriticalThreshold: (widgetSettings.memCriticalThreshold !== undefined) ? widgetSettings.memCriticalThreshold : widgetMetadata.memCriticalThreshold - readonly property int diskWarningThreshold: (widgetSettings.diskWarningThreshold !== undefined) ? widgetSettings.diskWarningThreshold : widgetMetadata.diskWarningThreshold - readonly property int diskCriticalThreshold: (widgetSettings.diskCriticalThreshold !== undefined) ? widgetSettings.diskCriticalThreshold : widgetMetadata.diskCriticalThreshold + // Threshold settings from global configuration + readonly property int cpuWarningThreshold: Settings.data.systemMonitor.cpuWarningThreshold + readonly property int cpuCriticalThreshold: Settings.data.systemMonitor.cpuCriticalThreshold + readonly property int tempWarningThreshold: Settings.data.systemMonitor.tempWarningThreshold + readonly property int tempCriticalThreshold: Settings.data.systemMonitor.tempCriticalThreshold + readonly property int memWarningThreshold: Settings.data.systemMonitor.memWarningThreshold + readonly property int memCriticalThreshold: Settings.data.systemMonitor.memCriticalThreshold + readonly property int diskWarningThreshold: Settings.data.systemMonitor.diskWarningThreshold + readonly property int diskCriticalThreshold: Settings.data.systemMonitor.diskCriticalThreshold // Warning threshold calculation properties readonly property bool cpuWarning: showCpuUsage && SystemStatService.cpuUsage > cpuWarningThreshold diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml index adc464fc..86c65b96 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml @@ -21,16 +21,6 @@ ColumnLayout { property bool valueShowNetworkStats: widgetData.showNetworkStats !== undefined ? widgetData.showNetworkStats : widgetMetadata.showNetworkStats property bool valueShowDiskUsage: widgetData.showDiskUsage !== undefined ? widgetData.showDiskUsage : widgetMetadata.showDiskUsage - // Threshold settings - property int valueCpuWarningThreshold: widgetData.cpuWarningThreshold !== undefined ? widgetData.cpuWarningThreshold : widgetMetadata.cpuWarningThreshold - property int valueCpuCriticalThreshold: widgetData.cpuCriticalThreshold !== undefined ? widgetData.cpuCriticalThreshold : widgetMetadata.cpuCriticalThreshold - property int valueTempWarningThreshold: widgetData.tempWarningThreshold !== undefined ? widgetData.tempWarningThreshold : widgetMetadata.tempWarningThreshold - property int valueTempCriticalThreshold: widgetData.tempCriticalThreshold !== undefined ? widgetData.tempCriticalThreshold : widgetMetadata.tempCriticalThreshold - property int valueMemWarningThreshold: widgetData.memWarningThreshold !== undefined ? widgetData.memWarningThreshold : widgetMetadata.memWarningThreshold - property int valueMemCriticalThreshold: widgetData.memCriticalThreshold !== undefined ? widgetData.memCriticalThreshold : widgetMetadata.memCriticalThreshold - property int valueDiskWarningThreshold: widgetData.diskWarningThreshold !== undefined ? widgetData.diskWarningThreshold : widgetMetadata.diskWarningThreshold - property int valueDiskCriticalThreshold: widgetData.diskCriticalThreshold !== undefined ? widgetData.diskCriticalThreshold : widgetMetadata.diskCriticalThreshold - function saveSettings() { var settings = Object.assign({}, widgetData || {}) settings.usePrimaryColor = valueUsePrimaryColor @@ -40,27 +30,6 @@ ColumnLayout { settings.showMemoryAsPercent = valueShowMemoryAsPercent settings.showNetworkStats = valueShowNetworkStats settings.showDiskUsage = valueShowDiskUsage - settings.cpuWarningThreshold = valueCpuWarningThreshold - settings.cpuCriticalThreshold = valueCpuCriticalThreshold - settings.tempWarningThreshold = valueTempWarningThreshold - settings.tempCriticalThreshold = valueTempCriticalThreshold - settings.memWarningThreshold = valueMemWarningThreshold - settings.memCriticalThreshold = valueMemCriticalThreshold - settings.diskWarningThreshold = valueDiskWarningThreshold - settings.diskCriticalThreshold = valueDiskCriticalThreshold - // Ensure critical thresholds are not less than their warning counterparts. - if (settings.cpuCriticalThreshold < settings.cpuWarningThreshold) { - settings.cpuCriticalThreshold = Math.min(100, settings.cpuWarningThreshold) - } - if (settings.tempCriticalThreshold < settings.tempWarningThreshold) { - settings.tempCriticalThreshold = Math.min(100, settings.tempWarningThreshold) - } - if (settings.memCriticalThreshold < settings.memWarningThreshold) { - settings.memCriticalThreshold = Math.min(100, settings.memWarningThreshold) - } - if (settings.diskCriticalThreshold < settings.diskWarningThreshold) { - settings.diskCriticalThreshold = Math.min(100, settings.diskWarningThreshold) - } return settings } @@ -127,214 +96,4 @@ ColumnLayout { checked: valueShowDiskUsage onToggled: checked => valueShowDiskUsage = checked } - - NDivider { - Layout.fillWidth: true - Layout.topMargin: Style.marginM - Layout.bottomMargin: Style.marginM - } - - NHeader { - Layout.fillWidth: true - label: I18n.tr("bar.widget-settings.system-monitor.thresholds.header") - description: I18n.tr("bar.widget-settings.system-monitor.thresholds.description") - } - - // CPU Usage Thresholds - RowLayout { - Layout.fillWidth: true - spacing: Style.marginM - visible: valueShowCpuUsage - - // Warning threshold - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.cpu-warning-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueCpuWarningThreshold - onValueChanged: valueCpuWarningThreshold = value - suffix: "%" - } - } - - // Critical threshold - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.cpu-critical-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueCpuCriticalThreshold - onValueChanged: valueCpuCriticalThreshold = value - suffix: "%" - } - } - } - - // Temperature Thresholds - RowLayout { - Layout.fillWidth: true - spacing: Style.marginM - visible: valueShowCpuTemp - - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.temp-warning-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueTempWarningThreshold - onValueChanged: valueTempWarningThreshold = value - suffix: "°C" - } - } - - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.temp-critical-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueTempCriticalThreshold - onValueChanged: valueTempCriticalThreshold = value - suffix: "°C" - } - } - } - - // Memory Usage Thresholds - RowLayout { - Layout.fillWidth: true - spacing: Style.marginM - visible: valueShowMemoryUsage - - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.mem-warning-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueMemWarningThreshold - onValueChanged: valueMemWarningThreshold = value - suffix: "%" - } - } - - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.mem-critical-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueMemCriticalThreshold - onValueChanged: valueMemCriticalThreshold = value - suffix: "%" - } - } - } - - // Storage Space Thresholds - RowLayout { - Layout.fillWidth: true - spacing: Style.marginM - visible: valueShowDiskUsage - - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.disk-warning-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueDiskWarningThreshold - onValueChanged: valueDiskWarningThreshold = value - suffix: "%" - } - } - - RowLayout { - Layout.fillWidth: true - spacing: Style.marginXS - - NText { - text: I18n.tr("bar.widget-settings.system-monitor.disk-critical-threshold.label") - pointSize: Style.fontSizeS - Layout.alignment: Qt.AlignVCenter - } - - NSpinBox { - Layout.fillWidth: true - from: 0 - to: 100 - stepSize: 5 - value: valueDiskCriticalThreshold - onValueChanged: valueDiskCriticalThreshold = value - suffix: "%" - } - } - } } diff --git a/Modules/Panels/Settings/SettingsPanel.qml b/Modules/Panels/Settings/SettingsPanel.qml index c0dda187..f562a481 100644 --- a/Modules/Panels/Settings/SettingsPanel.qml +++ b/Modules/Panels/Settings/SettingsPanel.qml @@ -264,13 +264,12 @@ SmartPanel { "label": "settings.session-menu.title", "icon": "settings-session-menu", "source": sessionMenuTab - }, // { - // "id": SettingsPanel.Tab.SystemMonitor, - // "label": "settings.system-monitor.title", - // "icon": "settings-system-monitor", - // "source": systemMonitorTab - // }, - { + }, { + "id": SettingsPanel.Tab.SystemMonitor, + "label": "settings.system-monitor.title", + "icon": "settings-system-monitor", + "source": systemMonitorTab + }, { "id": SettingsPanel.Tab.Hooks, "label": "settings.hooks.title", "icon": "settings-hooks", diff --git a/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml b/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml index 80d58f33..cd36f80b 100644 --- a/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml +++ b/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml @@ -11,12 +11,234 @@ ColumnLayout { spacing: Style.marginL - Component.onCompleted: { - - } - NHeader { + Layout.fillWidth: true label: I18n.tr("settings.system-monitor.general.section.label") description: I18n.tr("settings.system-monitor.general.section.description") } + + // CPU Usage Thresholds + NText { + Layout.fillWidth: true + Layout.topMargin: Style.marginM + text: I18n.tr("settings.system-monitor.cpu-section.label") + pointSize: Style.fontSizeM + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.cpu-warning-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: 0 + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.cpuWarningThreshold + onValueChanged: { + Settings.data.systemMonitor.cpuWarningThreshold = value + // Ensure critical >= warning + if (Settings.data.systemMonitor.cpuCriticalThreshold < value) { + Settings.data.systemMonitor.cpuCriticalThreshold = value + } + } + suffix: "%" + } + } + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.cpu-critical-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: Settings.data.systemMonitor.cpuWarningThreshold + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.cpuCriticalThreshold + onValueChanged: Settings.data.systemMonitor.cpuCriticalThreshold = value + suffix: "%" + } + } + } + + // Temperature Thresholds + NText { + Layout.fillWidth: true + Layout.topMargin: Style.marginM + text: I18n.tr("settings.system-monitor.temperature-section.label") + pointSize: Style.fontSizeM + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.temp-warning-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: 0 + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.tempWarningThreshold + onValueChanged: { + Settings.data.systemMonitor.tempWarningThreshold = value + if (Settings.data.systemMonitor.tempCriticalThreshold < value) { + Settings.data.systemMonitor.tempCriticalThreshold = value + } + } + suffix: "°C" + } + } + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.temp-critical-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: Settings.data.systemMonitor.tempWarningThreshold + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.tempCriticalThreshold + onValueChanged: Settings.data.systemMonitor.tempCriticalThreshold = value + suffix: "°C" + } + } + } + + // Memory Usage Thresholds + NText { + Layout.fillWidth: true + Layout.topMargin: Style.marginM + text: I18n.tr("settings.system-monitor.memory-section.label") + pointSize: Style.fontSizeM + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.mem-warning-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: 0 + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.memWarningThreshold + onValueChanged: { + Settings.data.systemMonitor.memWarningThreshold = value + if (Settings.data.systemMonitor.memCriticalThreshold < value) { + Settings.data.systemMonitor.memCriticalThreshold = value + } + } + suffix: "%" + } + } + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.mem-critical-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: Settings.data.systemMonitor.memWarningThreshold + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.memCriticalThreshold + onValueChanged: Settings.data.systemMonitor.memCriticalThreshold = value + suffix: "%" + } + } + } + + // Disk Usage Thresholds + NText { + Layout.fillWidth: true + Layout.topMargin: Style.marginM + text: I18n.tr("settings.system-monitor.disk-section.label") + pointSize: Style.fontSizeM + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.disk-warning-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: 0 + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.diskWarningThreshold + onValueChanged: { + Settings.data.systemMonitor.diskWarningThreshold = value + if (Settings.data.systemMonitor.diskCriticalThreshold < value) { + Settings.data.systemMonitor.diskCriticalThreshold = value + } + } + suffix: "%" + } + } + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.disk-critical-threshold.label") + pointSize: Style.fontSizeS + } + + NSpinBox { + from: Settings.data.systemMonitor.diskWarningThreshold + to: 100 + stepSize: 5 + value: Settings.data.systemMonitor.diskCriticalThreshold + onValueChanged: Settings.data.systemMonitor.diskCriticalThreshold = value + suffix: "%" + } + } + } } diff --git a/Services/UI/BarWidgetRegistry.qml b/Services/UI/BarWidgetRegistry.qml index 1719d819..c4133e47 100644 --- a/Services/UI/BarWidgetRegistry.qml +++ b/Services/UI/BarWidgetRegistry.qml @@ -150,15 +150,7 @@ Singleton { "showMemoryUsage": true, "showMemoryAsPercent": false, "showNetworkStats": false, - "showDiskUsage": false, - "cpuWarningThreshold": 80, - "cpuCriticalThreshold": 90, - "tempWarningThreshold": 80, - "tempCriticalThreshold": 90, - "memWarningThreshold": 80, - "memCriticalThreshold": 90, - "diskWarningThreshold": 80, - "diskCriticalThreshold": 90 + "showDiskUsage": false }, "Taskbar": { "allowUserSettings": true, From ea8ddcaef8e37e3defee75c22db3513ec9f94578 Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Fri, 14 Nov 2025 17:18:52 +0800 Subject: [PATCH 11/14] i18n: add ai translations for system monitor threshold settings --- Assets/Translations/de.json | 54 ++++++++++++++++++++++++++++------ Assets/Translations/en.json | 36 +++++++++++++++++++++++ Assets/Translations/es.json | 54 ++++++++++++++++++++++++++++------ Assets/Translations/fr.json | 54 ++++++++++++++++++++++++++++------ Assets/Translations/nl.json | 38 +++++++++++++++++++++++- Assets/Translations/pt.json | 54 ++++++++++++++++++++++++++++------ Assets/Translations/ru.json | 52 +++++++++++++++++++++++++++----- Assets/Translations/tr.json | 45 ++++++++++++++++++++++++++++ Assets/Translations/uk-UA.json | 45 ++++++++++++++++++++++++++++ Assets/Translations/zh-CN.json | 45 ++++++++++++++++++++++++++++ 10 files changed, 432 insertions(+), 45 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 626c1fac..c4ca8711 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -271,28 +271,28 @@ "description": "Schwellenwerte für visuelle Indikatoren konfigurieren. Warn-/Kritik-Indikatoren erscheinen in hervorgehobenen Farben bei Überschreitung." }, "cpu-warning-threshold": { - "label": "CPU-Auslastung (Warnung)" + "label": "CPU Usage (Warning)" }, "cpu-critical-threshold": { - "label": "CPU-Auslastung (Kritisch)" + "label": "CPU Usage (Critical)" }, "temp-warning-threshold": { - "label": "CPU-Temperatur (Warnung)" + "label": "CPU Temperature (Warning)" }, "temp-critical-threshold": { - "label": "CPU-Temperatur (Kritisch)" + "label": "CPU Temperature (Critical)" }, "mem-warning-threshold": { - "label": "Speicherverbrauch (Warnung)" + "label": "Memory Usage (Warning)" }, "mem-critical-threshold": { - "label": "Speicherverbrauch (Kritisch)" + "label": "Memory Usage (Critical)" }, "disk-warning-threshold": { - "label": "Speicherplatz (Warnung)" + "label": "Storage Space (Warning)" }, "disk-critical-threshold": { - "label": "Speicherplatz (Kritisch)" + "label": "Storage Space (Critical)" } }, "taskbar": { @@ -1603,6 +1603,42 @@ "label": "Allgemein" } }, + "cpu-section": { + "label": "CPU-Auslastung" + }, + "cpu-warning-threshold": { + "label": "Warnschwelle" + }, + "cpu-critical-threshold": { + "label": "Kritische Schwelle" + }, + "temperature-section": { + "label": "CPU-Temperatur" + }, + "temp-warning-threshold": { + "label": "Warnschwelle" + }, + "temp-critical-threshold": { + "label": "Kritische Schwelle" + }, + "memory-section": { + "label": "Speicherverbrauch" + }, + "mem-warning-threshold": { + "label": "Warnschwelle" + }, + "mem-critical-threshold": { + "label": "Kritische Schwelle" + }, + "disk-section": { + "label": "Festplattennutzung" + }, + "disk-warning-threshold": { + "label": "Warnschwelle" + }, + "disk-critical-threshold": { + "label": "Kritische Schwelle" + }, "title": "Systemmonitor" }, "user-interface": { @@ -2111,4 +2147,4 @@ "title": "WLAN" } } -} \ No newline at end of file +} diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index c62aa095..4f771441 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1603,6 +1603,42 @@ "label": "General" } }, + "cpu-section": { + "label": "CPU Usage" + }, + "cpu-warning-threshold": { + "label": "Warning Threshold" + }, + "cpu-critical-threshold": { + "label": "Critical Threshold" + }, + "temperature-section": { + "label": "CPU Temperature" + }, + "temp-warning-threshold": { + "label": "Warning Threshold" + }, + "temp-critical-threshold": { + "label": "Critical Threshold" + }, + "memory-section": { + "label": "Memory Usage" + }, + "mem-warning-threshold": { + "label": "Warning Threshold" + }, + "mem-critical-threshold": { + "label": "Critical Threshold" + }, + "disk-section": { + "label": "Disk Usage" + }, + "disk-warning-threshold": { + "label": "Warning Threshold" + }, + "disk-critical-threshold": { + "label": "Critical Threshold" + }, "title": "System Monitor" }, "user-interface": { diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index e769c9d0..bd3421b9 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -271,28 +271,28 @@ "description": "Establece umbrales para alertas de métricas del sistema. Resalta cuando se superan." }, "cpu-warning-threshold": { - "label": "Uso de CPU (Advertencia)" + "label": "CPU Usage (Warning)" }, "cpu-critical-threshold": { - "label": "Uso de CPU (Crítico)" + "label": "CPU Usage (Critical)" }, "temp-warning-threshold": { - "label": "Temperatura de CPU (Advertencia)" + "label": "CPU Temperature (Warning)" }, "temp-critical-threshold": { - "label": "Temperatura de CPU (Crítico)" + "label": "CPU Temperature (Critical)" }, "mem-warning-threshold": { - "label": "Uso de memoria (Advertencia)" + "label": "Memory Usage (Warning)" }, "mem-critical-threshold": { - "label": "Uso de memoria (Crítico)" + "label": "Memory Usage (Critical)" }, "disk-warning-threshold": { - "label": "Espacio de almacenamiento (Advertencia)" + "label": "Storage Space (Warning)" }, "disk-critical-threshold": { - "label": "Espacio de almacenamiento (Crítico)" + "label": "Storage Space (Critical)" } }, "taskbar": { @@ -1603,6 +1603,42 @@ "label": "General" } }, + "cpu-section": { + "label": "Uso de CPU" + }, + "cpu-warning-threshold": { + "label": "Umbral de advertencia" + }, + "cpu-critical-threshold": { + "label": "Umbral crítico" + }, + "temperature-section": { + "label": "Temperatura de la CPU" + }, + "temp-warning-threshold": { + "label": "Umbral de advertencia" + }, + "temp-critical-threshold": { + "label": "Umbral crítico" + }, + "memory-section": { + "label": "Uso de memoria" + }, + "mem-warning-threshold": { + "label": "Umbral de advertencia" + }, + "mem-critical-threshold": { + "label": "Umbral crítico" + }, + "disk-section": { + "label": "Uso de disco" + }, + "disk-warning-threshold": { + "label": "Umbral de advertencia" + }, + "disk-critical-threshold": { + "label": "Umbral crítico" + }, "title": "Monitor del sistema" }, "user-interface": { @@ -2111,4 +2147,4 @@ "title": "Wi-Fi" } } -} \ No newline at end of file +} diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 97aaf345..b70fc234 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -271,28 +271,28 @@ "description": "Configurez les seuils des indicateurs visuels. Les indicateurs d'avertissement/critique apparaissent en couleurs mises en surbrillance lorsque les valeurs dépassent ces limites." }, "cpu-warning-threshold": { - "label": "Utilisation CPU (Avertissement)" + "label": "CPU Usage (Warning)" }, "cpu-critical-threshold": { - "label": "Utilisation CPU (Critique)" + "label": "CPU Usage (Critical)" }, "temp-warning-threshold": { - "label": "Température CPU (Avertissement)" + "label": "CPU Temperature (Warning)" }, "temp-critical-threshold": { - "label": "Température CPU (Critique)" + "label": "CPU Temperature (Critical)" }, "mem-warning-threshold": { - "label": "Utilisation mémoire (Avertissement)" + "label": "Memory Usage (Warning)" }, "mem-critical-threshold": { - "label": "Utilisation mémoire (Critique)" + "label": "Memory Usage (Critical)" }, "disk-warning-threshold": { - "label": "Espace disque (Avertissement)" + "label": "Storage Space (Warning)" }, "disk-critical-threshold": { - "label": "Espace disque (Critique)" + "label": "Storage Space (Critical)" } }, "taskbar": { @@ -1603,6 +1603,42 @@ "label": "Général" } }, + "cpu-section": { + "label": "Utilisation CPU" + }, + "cpu-warning-threshold": { + "label": "Seuil d'avertissement" + }, + "cpu-critical-threshold": { + "label": "Seuil critique" + }, + "temperature-section": { + "label": "Température CPU" + }, + "temp-warning-threshold": { + "label": "Seuil d'avertissement" + }, + "temp-critical-threshold": { + "label": "Seuil critique" + }, + "memory-section": { + "label": "Utilisation mémoire" + }, + "mem-warning-threshold": { + "label": "Seuil d'avertissement" + }, + "mem-critical-threshold": { + "label": "Seuil critique" + }, + "disk-section": { + "label": "Utilisation disque" + }, + "disk-warning-threshold": { + "label": "Seuil d'avertissement" + }, + "disk-critical-threshold": { + "label": "Seuil critique" + }, "title": "Moniteur système" }, "user-interface": { @@ -2111,4 +2147,4 @@ "title": "Wi-Fi" } } -} \ No newline at end of file +} diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index f1f74974..28f8b34d 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -1575,6 +1575,42 @@ "label": "Algemeen" } }, + "cpu-section": { + "label": "CPU-gebruik" + }, + "cpu-warning-threshold": { + "label": "Waarschuwingsdrempel" + }, + "cpu-critical-threshold": { + "label": "Kritieke drempel" + }, + "temperature-section": { + "label": "CPU-temperatuur" + }, + "temp-warning-threshold": { + "label": "Waarschuwingsdrempel" + }, + "temp-critical-threshold": { + "label": "Kritieke drempel" + }, + "memory-section": { + "label": "Geheugengebruik" + }, + "mem-warning-threshold": { + "label": "Waarschuwingsdrempel" + }, + "mem-critical-threshold": { + "label": "Kritieke drempel" + }, + "disk-section": { + "label": "Schijfgebruik" + }, + "disk-warning-threshold": { + "label": "Waarschuwingsdrempel" + }, + "disk-critical-threshold": { + "label": "Kritieke drempel" + }, "title": "Systeemmonitor" }, "user-interface": { @@ -2083,4 +2119,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 23208d46..51270e61 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -271,28 +271,28 @@ "description": "Estabelece limites para alertas de métricas do sistema. Destaca quando superados." }, "cpu-warning-threshold": { - "label": "Uso da CPU (Aviso)" + "label": "CPU Usage (Warning)" }, "cpu-critical-threshold": { - "label": "Uso da CPU (Crítico)" + "label": "CPU Usage (Critical)" }, "temp-warning-threshold": { - "label": "Temperatura da CPU (Aviso)" + "label": "CPU Temperature (Warning)" }, "temp-critical-threshold": { - "label": "Temperatura da CPU (Crítico)" + "label": "CPU Temperature (Critical)" }, "mem-warning-threshold": { - "label": "Uso da memória (Aviso)" + "label": "Memory Usage (Warning)" }, "mem-critical-threshold": { - "label": "Uso da memória (Crítico)" + "label": "Memory Usage (Critical)" }, "disk-warning-threshold": { - "label": "Espaço de armazenamento (Aviso)" + "label": "Storage Space (Warning)" }, "disk-critical-threshold": { - "label": "Espaço de armazenamento (Crítico)" + "label": "Storage Space (Critical)" } }, "taskbar": { @@ -1603,6 +1603,42 @@ "label": "Geral" } }, + "cpu-section": { + "label": "Uso da CPU" + }, + "cpu-warning-threshold": { + "label": "Limite de aviso" + }, + "cpu-critical-threshold": { + "label": "Limite crítico" + }, + "temperature-section": { + "label": "Temperatura da CPU" + }, + "temp-warning-threshold": { + "label": "Limite de aviso" + }, + "temp-critical-threshold": { + "label": "Limite crítico" + }, + "memory-section": { + "label": "Uso de memória" + }, + "mem-warning-threshold": { + "label": "Limite de aviso" + }, + "mem-critical-threshold": { + "label": "Limite crítico" + }, + "disk-section": { + "label": "Uso do disco" + }, + "disk-warning-threshold": { + "label": "Limite de aviso" + }, + "disk-critical-threshold": { + "label": "Limite crítico" + }, "title": "Monitor do Sistema" }, "user-interface": { @@ -2111,4 +2147,4 @@ "title": "Wi-Fi" } } -} \ No newline at end of file +} diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 1237ce82..72ad0d42 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -271,28 +271,28 @@ "description": "Установите пороги для оповещений системных метрик. Выделяет при превышении." }, "cpu-warning-threshold": { - "label": "Загрузка ЦП (Предупреждение)" + "label": "CPU Usage (Warning)" }, "cpu-critical-threshold": { - "label": "Загрузка ЦП (Критический)" + "label": "CPU Usage (Critical)" }, "temp-warning-threshold": { - "label": "Температура ЦП (Предупреждение)" + "label": "CPU Temperature (Warning)" }, "temp-critical-threshold": { - "label": "Температура ЦП (Критический)" + "label": "CPU Temperature (Critical)" }, "mem-warning-threshold": { - "label": "Использование памяти (Предупреждение)" + "label": "Memory Usage (Warning)" }, "mem-critical-threshold": { - "label": "Использование памяти (Критический)" + "label": "Memory Usage (Critical)" }, "disk-warning-threshold": { - "label": "Место на диске (Предупреждение)" + "label": "Storage Space (Warning)" }, "disk-critical-threshold": { - "label": "Место на диске (Критический)" + "label": "Storage Space (Critical)" } }, "taskbar": { @@ -1603,6 +1603,42 @@ "label": "Общее" } }, + "cpu-section": { + "label": "Использование ЦП" + }, + "cpu-warning-threshold": { + "label": "Порог предупреждения" + }, + "cpu-critical-threshold": { + "label": "Критический порог" + }, + "temperature-section": { + "label": "Температура ЦП" + }, + "temp-warning-threshold": { + "label": "Порог предупреждения" + }, + "temp-critical-threshold": { + "label": "Критический порог" + }, + "memory-section": { + "label": "Использование памяти" + }, + "mem-warning-threshold": { + "label": "Порог предупреждения" + }, + "mem-critical-threshold": { + "label": "Критический порог" + }, + "disk-section": { + "label": "Использование диска" + }, + "disk-warning-threshold": { + "label": "Порог предупреждения" + }, + "disk-critical-threshold": { + "label": "Критический порог" + }, "title": "Системный монитор" }, "user-interface": { diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index f4c6c8fc..d8181446 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -1603,6 +1603,51 @@ "label": "Genel" } }, + "cpu-section": { + "label": "CPU Kullanımı" + }, + "cpu-warning-threshold": { + "label": "Uyarı Eşiği" + }, + "cpu-critical-threshold": { + "label": "Kritik Eşiği" + }, + "temperature-section": { + "label": "CPU Sıcaklığı" + }, + "temp-warning-threshold": { + "label": "Uyarı Eşiği" + }, + "temp-critical-threshold": { + "label": "Kritik Eşiği" + }, + "memory-section": { + "label": "Bellek Kullanımı" + }, + "mem-warning-threshold": { + "label": "Uyarı Eşiği" + }, + "mem-critical-threshold": { + "label": "Kritik Eşiği" + }, + "disk-section": { + "label": "Disk Kullanımı" + }, + "disk-warning-threshold": { + "label": "Uyarı Eşiği" + }, + "disk-critical-threshold": { + "label": "Kritik Eşiği" + }, + "network-section": { + "label": "Ağ Kullanımı" + }, + "network-warning-threshold": { + "label": "Uyarı Eşiği" + }, + "network-critical-threshold": { + "label": "Kritik Eşiği" + }, "title": "Sistem İzleme" }, "user-interface": { diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index ce26b9b9..de0d83c6 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -1603,6 +1603,51 @@ "label": "Загальне" } }, + "cpu-section": { + "label": "Використання ЦП" + }, + "cpu-warning-threshold": { + "label": "Поріг попередження" + }, + "cpu-critical-threshold": { + "label": "Критичний поріг" + }, + "temperature-section": { + "label": "Температура ЦП" + }, + "temp-warning-threshold": { + "label": "Поріг попередження" + }, + "temp-critical-threshold": { + "label": "Критичний поріг" + }, + "memory-section": { + "label": "Використання пам'яті" + }, + "mem-warning-threshold": { + "label": "Поріг попередження" + }, + "mem-critical-threshold": { + "label": "Критичний поріг" + }, + "disk-section": { + "label": "Використання диска" + }, + "disk-warning-threshold": { + "label": "Поріг попередження" + }, + "disk-critical-threshold": { + "label": "Критичний поріг" + }, + "network-section": { + "label": "Використання мережі" + }, + "network-warning-threshold": { + "label": "Поріг попередження" + }, + "network-critical-threshold": { + "label": "Критичний поріг" + }, "title": "Системний монітор" }, "user-interface": { diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index c8278b09..f9dfcd37 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -1603,6 +1603,51 @@ "label": "通用" } }, + "cpu-section": { + "label": "CPU 使用率" + }, + "cpu-warning-threshold": { + "label": "警告阈值" + }, + "cpu-critical-threshold": { + "label": "严重阈值" + }, + "temperature-section": { + "label": "CPU 温度" + }, + "temp-warning-threshold": { + "label": "警告阈值" + }, + "temp-critical-threshold": { + "label": "严重阈值" + }, + "memory-section": { + "label": "内存使用率" + }, + "mem-warning-threshold": { + "label": "警告阈值" + }, + "mem-critical-threshold": { + "label": "严重阈值" + }, + "disk-section": { + "label": "磁盘使用率" + }, + "disk-warning-threshold": { + "label": "警告阈值" + }, + "disk-critical-threshold": { + "label": "严重阈值" + }, + "network-section": { + "label": "网络使用率" + }, + "network-warning-threshold": { + "label": "警告阈值" + }, + "network-critical-threshold": { + "label": "严重阈值" + }, "title": "系统监视器" }, "user-interface": { From f1576a61a5f669a7d51cb130643d2688fea59089 Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Fri, 14 Nov 2025 20:20:52 +0800 Subject: [PATCH 12/14] SystemMonitor: add custom color settings for system monitor threshold settings --- Assets/settings-default.json | 5 +- Commons/Settings.qml | 3 + Modules/Bar/Widgets/SystemMonitor.qml | 16 +++- .../Panels/Settings/Tabs/SystemMonitorTab.qml | 89 ++++++++++++++++++- 4 files changed, 105 insertions(+), 8 deletions(-) diff --git a/Assets/settings-default.json b/Assets/settings-default.json index a18fd1de..44c11fe4 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -115,7 +115,10 @@ "memWarningThreshold": 80, "memCriticalThreshold": 90, "diskWarningThreshold": 80, - "diskCriticalThreshold": 90 + "diskCriticalThreshold": 90, + "useCustomColors": false, + "warningColor": "", + "criticalColor": "" }, "wallpaper": { "enabled": true, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index c5be9107..ac5de713 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -331,6 +331,9 @@ Singleton { property int memCriticalThreshold: 90 property int diskWarningThreshold: 80 property int diskCriticalThreshold: 90 + property bool useCustomColors: false + property string warningColor: "" + property string criticalColor: "" } // dock diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index 8bf78ba3..99913f88 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -52,8 +52,8 @@ Rectangle { readonly property real pillHeight: Style.capsuleHeight * pillBaseRatio // Highlight colors - readonly property color warningColor: Color.mTertiary - readonly property color criticalColor: Color.mError + readonly property color warningColor: Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.warningColor || Color.mTertiary) : Color.mTertiary + readonly property color criticalColor: Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.criticalColor || Color.mError) : Color.mError readonly property int percentTextWidth: Math.ceil(percentMetrics.boundingRect.width + 3) readonly property int tempTextWidth: Math.ceil(tempMetrics.boundingRect.width + 3) @@ -119,13 +119,15 @@ Rectangle { property bool warning: false property bool critical: false property int indicatorWidth: Style.capsuleHeight + property color warningColor: Color.mTertiary + property color criticalColor: Color.mError width: isVertical ? Math.max(0, indicatorWidth - Style.marginS * 2) : Math.max(0, indicatorWidth + Style.marginXS * 2) height: isVertical ? Math.max(0, Style.capsuleHeight + Style.marginXS * 2) : pillHeight radius: Math.min(width, height) / 2 // Hide the rectangular indicator when the bar is vertical; keep it available for horizontal layout visible: !root.isVertical - color: critical ? Color.mError : Color.mTertiary + color: critical ? criticalColor : warningColor scale: (warning || critical) ? 1.0 : 0.0 opacity: (warning || critical) ? 1.0 : 0.0 @@ -170,6 +172,8 @@ Rectangle { item.warning = Qt.binding(() => cpuWarning) item.critical = Qt.binding(() => cpuCritical) item.indicatorWidth = Qt.binding(() => cpuUsageContainer.width) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) } } @@ -242,6 +246,8 @@ Rectangle { item.warning = Qt.binding(() => tempWarning) item.critical = Qt.binding(() => tempCritical) item.indicatorWidth = Qt.binding(() => cpuTempContainer.width) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) } } @@ -307,6 +313,8 @@ Rectangle { item.warning = Qt.binding(() => memWarning) item.critical = Qt.binding(() => memCritical) item.indicatorWidth = Qt.binding(() => memoryContainer.width) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) } } @@ -460,6 +468,8 @@ Rectangle { item.warning = Qt.binding(() => diskWarning) item.critical = Qt.binding(() => diskCritical) item.indicatorWidth = Qt.binding(() => diskContainer.width) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) } } diff --git a/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml b/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml index cd36f80b..ec89cc98 100644 --- a/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml +++ b/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml @@ -17,7 +17,88 @@ ColumnLayout { description: I18n.tr("settings.system-monitor.general.section.description") } - // CPU Usage Thresholds + // Colors Section + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NToggle { + label: I18n.tr("settings.system-monitor.use-custom-highlight-colors.label") + description: I18n.tr("settings.system-monitor.use-custom-highlight-colors.description") + checked: Settings.data.systemMonitor.useCustomColors + onToggled: { + // If enabling custom colors and no custom color is saved, persist current theme colors + if (checked) { + if (!Settings.data.systemMonitor.warningColor || Settings.data.systemMonitor.warningColor === "") { + Settings.data.systemMonitor.warningColor = Color.mTertiary.toString() + } + if (!Settings.data.systemMonitor.criticalColor || Settings.data.systemMonitor.criticalColor === "") { + Settings.data.systemMonitor.criticalColor = Color.mError.toString() + } + } + Settings.data.systemMonitor.useCustomColors = checked + } + } + } + + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + visible: Settings.data.systemMonitor.useCustomColors + + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.warning-color.label") + pointSize: Style.fontSizeS + } + + NColorPicker { + Layout.preferredWidth: Style.sliderWidth + Layout.preferredHeight: Style.baseWidgetSize + enabled: Settings.data.systemMonitor.useCustomColors + selectedColor: Settings.data.systemMonitor.warningColor || Color.mTertiary + onColorSelected: function(color) { + Settings.data.systemMonitor.warningColor = color + } + } + } + + ColumnLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NText { + text: I18n.tr("settings.system-monitor.critical-color.label") + pointSize: Style.fontSizeS + } + + NColorPicker { + Layout.preferredWidth: Style.sliderWidth + Layout.preferredHeight: Style.baseWidgetSize + enabled: Settings.data.systemMonitor.useCustomColors + selectedColor: Settings.data.systemMonitor.criticalColor || Color.mError + onColorSelected: function(color) { + Settings.data.systemMonitor.criticalColor = color + } + } + } + } + + NDivider { + Layout.fillWidth: true + } + + NHeader { + Layout.fillWidth: true + label: I18n.tr("settings.system-monitor.thresholds-section.label") + description: I18n.tr("settings.system-monitor.thresholds-section.description") + } + + // CPU Usage NText { Layout.fillWidth: true Layout.topMargin: Style.marginM @@ -74,7 +155,7 @@ ColumnLayout { } } - // Temperature Thresholds + // Temperature NText { Layout.fillWidth: true Layout.topMargin: Style.marginM @@ -130,7 +211,7 @@ ColumnLayout { } } - // Memory Usage Thresholds + // Memory Usage NText { Layout.fillWidth: true Layout.topMargin: Style.marginM @@ -186,7 +267,7 @@ ColumnLayout { } } - // Disk Usage Thresholds + // Disk Usage NText { Layout.fillWidth: true Layout.topMargin: Style.marginM From 96c750b2bb3c2a82bd01ff0db6820697901581e1 Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Fri, 14 Nov 2025 21:32:41 +0800 Subject: [PATCH 13/14] SystemMonitorCard: apply threshold highlight for mertrics in control center --- .../Panels/ControlCenter/Cards/SystemMonitorCard.qml | 12 ++++++++++++ Widgets/NCircleStat.qml | 7 ++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Modules/Panels/ControlCenter/Cards/SystemMonitorCard.qml b/Modules/Panels/ControlCenter/Cards/SystemMonitorCard.qml index 2aa62105..d82bbbe4 100644 --- a/Modules/Panels/ControlCenter/Cards/SystemMonitorCard.qml +++ b/Modules/Panels/ControlCenter/Cards/SystemMonitorCard.qml @@ -27,6 +27,9 @@ NBox { contentScale: 0.8 height: content.widgetHeight Layout.alignment: Qt.AlignHCenter + // Highlight color based on thresholds + fillColor: (SystemStatService.cpuUsage > Settings.data.systemMonitor.cpuCriticalThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.criticalColor || Color.mError) : Color.mError): (SystemStatService.cpuUsage > Settings.data.systemMonitor.cpuWarningThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.warningColor || Color.mTertiary) : Color.mTertiary): Color.mPrimary + textColor: (SystemStatService.cpuUsage > Settings.data.systemMonitor.cpuCriticalThreshold)? Color.mSurfaceVariant: (SystemStatService.cpuUsage > Settings.data.systemMonitor.cpuWarningThreshold)? Color.mSurfaceVariant: Color.mOnSurface } NCircleStat { value: SystemStatService.cpuTemp @@ -36,6 +39,9 @@ NBox { contentScale: 0.8 height: content.widgetHeight Layout.alignment: Qt.AlignHCenter + // Highlight color based on thresholds + fillColor: (SystemStatService.cpuTemp > Settings.data.systemMonitor.tempCriticalThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.criticalColor || Color.mError) : Color.mError): (SystemStatService.cpuTemp > Settings.data.systemMonitor.tempWarningThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.warningColor || Color.mTertiary) : Color.mTertiary): Color.mPrimary + textColor: (SystemStatService.cpuTemp > Settings.data.systemMonitor.tempCriticalThreshold)? Color.mSurfaceVariant: (SystemStatService.cpuTemp > Settings.data.systemMonitor.tempWarningThreshold)? Color.mSurfaceVariant: Color.mOnSurface } NCircleStat { value: SystemStatService.memPercent @@ -44,6 +50,9 @@ NBox { contentScale: 0.8 height: content.widgetHeight Layout.alignment: Qt.AlignHCenter + // Highlight color based on thresholds + fillColor: (SystemStatService.memPercent > Settings.data.systemMonitor.memCriticalThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.criticalColor || Color.mError) : Color.mError): (SystemStatService.memPercent > Settings.data.systemMonitor.memWarningThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.warningColor || Color.mTertiary) : Color.mTertiary): Color.mPrimary + textColor: (SystemStatService.memPercent > Settings.data.systemMonitor.memCriticalThreshold)? Color.mSurfaceVariant: (SystemStatService.memPercent > Settings.data.systemMonitor.memWarningThreshold)? Color.mSurfaceVariant: Color.mOnSurface } NCircleStat { value: SystemStatService.diskPercents["/"] ?? 0 @@ -52,6 +61,9 @@ NBox { contentScale: 0.8 height: content.widgetHeight Layout.alignment: Qt.AlignHCenter + // Highlight color based on thresholds + fillColor: ( (SystemStatService.diskPercents["/"] ?? 0) > Settings.data.systemMonitor.diskCriticalThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.criticalColor || Color.mError) : Color.mError): ( (SystemStatService.diskPercents["/"] ?? 0) > Settings.data.systemMonitor.diskWarningThreshold)? (Settings.data.systemMonitor.useCustomColors ? (Settings.data.systemMonitor.warningColor || Color.mTertiary) : Color.mTertiary): Color.mPrimary + textColor: ((SystemStatService.diskPercents["/"] ?? 0) > Settings.data.systemMonitor.diskCriticalThreshold)? Color.mSurfaceVariant: ((SystemStatService.diskPercents["/"] ?? 0) > Settings.data.systemMonitor.diskWarningThreshold)? Color.mSurfaceVariant: Color.mOnSurface } } } diff --git a/Widgets/NCircleStat.qml b/Widgets/NCircleStat.qml index a8c2a059..ade9e360 100644 --- a/Widgets/NCircleStat.qml +++ b/Widgets/NCircleStat.qml @@ -16,7 +16,8 @@ Rectangle { // outer width/height footprint of the component property real contentScale: 1.0 - readonly property color fillColor: Color.mPrimary + property color fillColor: Color.mPrimary + property color textColor: Color.mOnSurface width: 68 height: 92 @@ -118,7 +119,7 @@ Rectangle { text: `${Math.round(root.value)}${root.suffix}` pointSize: Style.fontSizeM * contentScale * 0.9 font.weight: Style.fontWeightBold - color: Color.mOnSurface + color: root.fillColor horizontalAlignment: Text.AlignHCenter } @@ -128,7 +129,7 @@ Rectangle { anchors.top: valueLabel.bottom anchors.topMargin: 8 * contentScale icon: root.icon - color: Color.mPrimary + color: root.fillColor pointSize: Style.fontSizeM horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter From 26d30bdaa5dae963b10bd43db60d3bed89da26f3 Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Fri, 14 Nov 2025 22:03:38 +0800 Subject: [PATCH 14/14] i18n: add ai translations for system monitor custom threshold highlight color settings --- Assets/Translations/de.json | 22 +++++++++++++++++++++- Assets/Translations/en.json | 20 ++++++++++++++++++++ Assets/Translations/es.json | 22 +++++++++++++++++++++- Assets/Translations/fr.json | 22 +++++++++++++++++++++- Assets/Translations/nl.json | 20 ++++++++++++++++++++ Assets/Translations/pt.json | 22 +++++++++++++++++++++- Assets/Translations/ru.json | 22 +++++++++++++++++++++- Assets/Translations/tr.json | 20 ++++++++++++++++++++ Assets/Translations/uk-UA.json | 20 ++++++++++++++++++++ Assets/Translations/zh-CN.json | 20 ++++++++++++++++++++ 10 files changed, 205 insertions(+), 5 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index c4ca8711..026b8927 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -1603,6 +1603,26 @@ "label": "Allgemein" } }, + "highlight-colors-section": { + "label": "Hervorhebungsfarben" + }, + "use-custom-highlight-colors": { + "label": "Benutzerdefinierte Hervorhebungsfarben verwenden", + "description": "Wenn deaktiviert, werden die Standard-Hervorhebungsfarben des Themes verwendet." + }, + "custom-highlight-colors-title": { + "label": "Benutzerdefinierte Hervorhebungsfarben" + }, + "warning-color": { + "label": "Warnfarbe" + }, + "critical-color": { + "label": "Kritische Farbe" + }, + "thresholds-section": { + "label": "Schwellenwerte", + "description": "Setzen Sie Schwellenwerte für Systemmetriken; Werte darüber werden hervorgehoben." + }, "cpu-section": { "label": "CPU-Auslastung" }, @@ -2147,4 +2167,4 @@ "title": "WLAN" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 4f771441..4240eb48 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1603,6 +1603,26 @@ "label": "General" } }, + "highlight-colors-section": { + "label": "Highlight Colors" + }, + "use-custom-highlight-colors": { + "label": "Use custom highlight colors", + "description": "When disabled, theme default highlight colors are used." + }, + "custom-highlight-colors-title": { + "label": "Custom highlight colors" + }, + "warning-color": { + "label": "Warning Color" + }, + "critical-color": { + "label": "Critical Color" + }, + "thresholds-section": { + "label": "Thresholds", + "description": "Set thresholds for system metrics, values above these will be highlighted." + }, "cpu-section": { "label": "CPU Usage" }, diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index bd3421b9..51724c64 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -1603,6 +1603,26 @@ "label": "General" } }, + "highlight-colors-section": { + "label": "Colores de resaltado" + }, + "use-custom-highlight-colors": { + "label": "Usar colores de resaltado personalizados", + "description": "Cuando está desactivado, se usan los colores de resaltado predeterminados del tema." + }, + "custom-highlight-colors-title": { + "label": "Colores de resaltado personalizados" + }, + "warning-color": { + "label": "Color de advertencia" + }, + "critical-color": { + "label": "Color crítico" + }, + "thresholds-section": { + "label": "Umbrales", + "description": "Establece umbrales para métricas del sistema; los valores por encima se resaltarán." + }, "cpu-section": { "label": "Uso de CPU" }, @@ -2147,4 +2167,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index b70fc234..9f744e0c 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -40,6 +40,26 @@ "description": "Si activé, le visualiseur est masqué sauf lorsqu'un lecteur est en lecture.", "label": "Masquer lorsqu'aucun média n'est en lecture" }, + "highlight-colors-section": { + "label": "Couleurs de surlignage" + }, + "use-custom-highlight-colors": { + "label": "Utiliser des couleurs de surlignage personnalisées", + "description": "Si désactivé, les couleurs de surlignage par défaut du thème sont utilisées." + }, + "custom-highlight-colors-title": { + "label": "Couleurs de surlignage personnalisées" + }, + "warning-color": { + "label": "Couleur d'avertissement" + }, + "critical-color": { + "label": "Couleur critique" + }, + "thresholds-section": { + "label": "Seuils", + "description": "Définissez des seuils pour les métriques système ; les valeurs supérieures seront mises en évidence." + }, "width": { "description": "Largeur personnalisée du composant.", "label": "Largeur" @@ -2147,4 +2167,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index 28f8b34d..32af3b82 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -268,6 +268,26 @@ } }, "taskbar": { + "highlight-colors-section": { + "label": "Markeer kleuren" + }, + "use-custom-highlight-colors": { + "label": "Aangepaste markeerkleuren gebruiken", + "description": "Wanneer uitgeschakeld worden de standaard markeerkleuren van het thema gebruikt." + }, + "custom-highlight-colors-title": { + "label": "Aangepaste markeerkleuren" + }, + "warning-color": { + "label": "Waarschuwingskleur" + }, + "critical-color": { + "label": "Kritieke kleur" + }, + "thresholds-section": { + "label": "Drempels", + "description": "Stel drempels in voor systeemstatistieken; waarden erboven worden gemarkeerd." + }, "colorize-icons": { "description": "Pas themakleuren toe op taakbalkpictogrammen.", "label": "Pictogrammen inkleuren" diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 51270e61..c1dfe398 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -1603,6 +1603,26 @@ "label": "Geral" } }, + "highlight-colors-section": { + "label": "Cores de destaque" + }, + "use-custom-highlight-colors": { + "label": "Usar cores de destaque personalizadas", + "description": "Quando desativado, são usadas as cores de destaque padrão do tema." + }, + "custom-highlight-colors-title": { + "label": "Cores de destaque personalizadas" + }, + "warning-color": { + "label": "Cor de aviso" + }, + "critical-color": { + "label": "Cor crítica" + }, + "thresholds-section": { + "label": "Limiares", + "description": "Defina limiares para métricas do sistema; valores acima serão destacados." + }, "cpu-section": { "label": "Uso da CPU" }, @@ -2147,4 +2167,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 72ad0d42..a9764196 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -1603,6 +1603,26 @@ "label": "Общее" } }, + "highlight-colors-section": { + "label": "Цвета выделения" + }, + "use-custom-highlight-colors": { + "label": "Использовать пользовательские цвета выделения", + "description": "Если отключено, используются цвета выделения по умолчанию темы." + }, + "custom-highlight-colors-title": { + "label": "Пользовательские цвета выделения" + }, + "warning-color": { + "label": "Цвет предупреждения" + }, + "critical-color": { + "label": "Критический цвет" + }, + "thresholds-section": { + "label": "Пороги", + "description": "Установите пороги для системных метрик; значения выше будут выделены." + }, "cpu-section": { "label": "Использование ЦП" }, @@ -2147,4 +2167,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index d8181446..0d9dd804 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -1603,6 +1603,26 @@ "label": "Genel" } }, + "highlight-colors-section": { + "label": "Vurgulama Renkleri" + }, + "use-custom-highlight-colors": { + "label": "Özel vurgulama renklerini kullan", + "description": "Devre dışı bırakıldığında, tema varsayılan vurgulama renkleri kullanılır." + }, + "custom-highlight-colors-title": { + "label": "Özel vurgulama renkleri" + }, + "warning-color": { + "label": "Uyarı rengi" + }, + "critical-color": { + "label": "Kritik renk" + }, + "thresholds-section": { + "label": "Eşikler", + "description": "Sistem metrikleri için eşikler ayarlayın; bu değerlerin üzerindekiler vurgulanacaktır." + }, "cpu-section": { "label": "CPU Kullanımı" }, diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index de0d83c6..b58fd419 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -1603,6 +1603,26 @@ "label": "Загальне" } }, + "highlight-colors-section": { + "label": "Кольори підсвічування" + }, + "use-custom-highlight-colors": { + "label": "Використовувати власні кольори підсвічування", + "description": "Якщо вимкнено, використовуються кольори підсвічування за замовчуванням теми." + }, + "custom-highlight-colors-title": { + "label": "Власні кольори підсвічування" + }, + "warning-color": { + "label": "Колір попередження" + }, + "critical-color": { + "label": "Критичний колір" + }, + "thresholds-section": { + "label": "Пороги", + "description": "Встановіть пороги для системних метрик; значення вище будуть підсвічені." + }, "cpu-section": { "label": "Використання ЦП" }, diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index f9dfcd37..f84846c4 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -1603,6 +1603,26 @@ "label": "通用" } }, + "highlight-colors-section": { + "label": "高亮颜色" + }, + "use-custom-highlight-colors": { + "label": "使用自定义高亮颜色", + "description": "关闭时将使用主题默认高亮颜色。" + }, + "custom-highlight-colors-title": { + "label": "自定义高亮颜色" + }, + "warning-color": { + "label": "警告颜色" + }, + "critical-color": { + "label": "严重颜色" + }, + "thresholds-section": { + "label": "阈值", + "description": "设置各项系统测量指标的阈值,超过该值将以高亮色进行提示。" + }, "cpu-section": { "label": "CPU 使用率" },