diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 0474b777..fd04e151 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -265,6 +265,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 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": { @@ -1575,6 +1603,62 @@ "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" + }, + "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": { @@ -2083,4 +2167,4 @@ "title": "WLAN" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index b92c800e..552ecc3f 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -265,6 +265,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": { @@ -1575,6 +1603,62 @@ "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" + }, + "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": { @@ -2083,4 +2167,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 9076a78d..f4056b0b 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -265,6 +265,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": "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": { @@ -1575,6 +1603,62 @@ "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" + }, + "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": { @@ -2083,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 10e96498..92277d33 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" @@ -265,6 +285,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": "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": { @@ -1575,6 +1623,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": { @@ -2083,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 0568efee..e9200185 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" @@ -1575,6 +1595,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 +2139,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 7d62b4ae..289ad4be 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -265,6 +265,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": "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": { @@ -1575,6 +1603,62 @@ "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" + }, + "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": { @@ -2083,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 64648c1f..8845d0b0 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -265,6 +265,34 @@ "storage-usage": { "description": "Показывать информацию об использовании дискового пространства.", "label": "Использование хранилища" + }, + "thresholds": { + "header": "Пороговые значения", + "description": "Установите пороги для оповещений системных метрик. Выделяет при превышении." + }, + "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": { @@ -1575,6 +1603,62 @@ "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-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": { @@ -2083,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 30335a5c..d68a5cd6 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -265,6 +265,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": { @@ -1575,6 +1603,71 @@ "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ı" + }, + "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": { @@ -2083,4 +2176,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 ef948d3e..6910b8f3 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -265,6 +265,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": { @@ -1575,6 +1603,71 @@ "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-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": { @@ -2083,4 +2176,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 8f16bd51..7c09040d 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -265,6 +265,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": { @@ -1575,6 +1603,71 @@ "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 使用率" + }, + "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": { @@ -2083,4 +2176,4 @@ "title": "Wi-Fi" } } -} +} \ No newline at end of file diff --git a/Assets/settings-default.json b/Assets/settings-default.json index e8ca2ab8..bb510da4 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -107,6 +107,19 @@ "audioSource": "default_output", "videoSource": "portal" }, + "systemMonitor": { + "cpuWarningThreshold": 80, + "cpuCriticalThreshold": 90, + "tempWarningThreshold": 80, + "tempCriticalThreshold": 90, + "memWarningThreshold": 80, + "memCriticalThreshold": 90, + "diskWarningThreshold": 80, + "diskCriticalThreshold": 90, + "useCustomColors": false, + "warningColor": "", + "criticalColor": "" + }, "wallpaper": { "enabled": true, "overviewEnabled": false, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 56161540..5246fa1d 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -321,6 +321,21 @@ 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 + property bool useCustomColors: false + property string warningColor: "" + property string criticalColor: "" + } + // dock property JsonObject dock: JsonObject { property bool enabled: true diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index caab8fda..99913f88 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -47,11 +47,39 @@ 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 + + // Highlight colors + 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) readonly property int memTextWidth: Math.ceil(memMetrics.boundingRect.width + 3) readonly property color textColor: usePrimaryColor ? Color.mPrimary : Color.mOnSurface + // 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 + 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 font.family: Settings.data.ui.fontFixed @@ -82,6 +110,42 @@ 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 + 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 ? criticalColor : warningColor + 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 +157,26 @@ 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) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) + } + } + GridLayout { id: cpuUsageContent anchors.centerIn: parent @@ -107,13 +186,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: isVertical ? (cpuCritical ? criticalColor : (cpuWarning ? warningColor : Color.mOnSurface)) : ((cpuWarning || cpuCritical) ? Color.mSurfaceVariant : Color.mOnSurface) + } } NText { @@ -133,7 +220,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: 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 @@ -143,11 +231,26 @@ 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) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) + } + } + GridLayout { id: cpuTempContent anchors.centerIn: parent @@ -157,13 +260,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: isVertical ? (tempCritical ? criticalColor : (tempWarning ? warningColor : Color.mOnSurface)) : ((tempWarning || tempCritical) ? Color.mSurfaceVariant : Color.mOnSurface) + } } NText { @@ -176,7 +287,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : tempTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: 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 @@ -186,11 +298,26 @@ 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) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) + } + } + GridLayout { id: memoryContent anchors.centerIn: parent @@ -200,13 +327,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: isVertical ? (memCritical ? criticalColor : (memWarning ? warningColor : Color.mOnSurface)) : ((memWarning || memCritical) ? Color.mSurfaceVariant : Color.mOnSurface) + } + + } NText { @@ -219,7 +356,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : (showMemoryAsPercent ? percentTextWidth : memTextWidth) horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: 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 @@ -315,11 +453,26 @@ 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) + item.warningColor = Qt.binding(() => root.warningColor) + item.criticalColor = Qt.binding(() => root.criticalColor) + } + } + GridLayout { id: diskContent anchors.centerIn: parent @@ -336,6 +489,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.row: isVertical ? 1 : 0 Layout.column: 0 + // 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 { @@ -348,7 +503,8 @@ Rectangle { Layout.preferredWidth: isVertical ? -1 : percentTextWidth horizontalAlignment: isVertical ? Text.AlignHCenter : Text.AlignRight verticalAlignment: Text.AlignVCenter - color: 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 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/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml index 9ca62f78..86c65b96 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/SystemMonitorSettings.qml @@ -30,6 +30,7 @@ ColumnLayout { settings.showMemoryAsPercent = valueShowMemoryAsPercent settings.showNetworkStats = valueShowNetworkStats settings.showDiskUsage = valueShowDiskUsage + return settings } diff --git a/Modules/Panels/Settings/SettingsPanel.qml b/Modules/Panels/Settings/SettingsPanel.qml index 62878b65..51e780f4 100644 --- a/Modules/Panels/Settings/SettingsPanel.qml +++ b/Modules/Panels/Settings/SettingsPanel.qml @@ -259,13 +259,12 @@ SmartPanel { "label": "settings.screen-recorder.title", "icon": "settings-screen-recorder", "source": screenRecorderTab - }, // { - // "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..ec89cc98 100644 --- a/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml +++ b/Modules/Panels/Settings/Tabs/SystemMonitorTab.qml @@ -11,12 +11,315 @@ 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") } + + // 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 + 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 + 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 + 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 + 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/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