mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
ngraph: dont force mError as secondary color - avoid two red curves on redish themes.
This commit is contained in:
@@ -14,9 +14,12 @@ DraggableDesktopWidget {
|
||||
readonly property var widgetMetadata: DesktopWidgetRegistry.widgetMetadata["SystemStat"]
|
||||
readonly property string statType: (widgetData && widgetData.statType !== undefined) ? widgetData.statType : (widgetMetadata.statType !== undefined ? widgetMetadata.statType : "CPU")
|
||||
readonly property string diskPath: (widgetData && widgetData.diskPath !== undefined) ? widgetData.diskPath : "/"
|
||||
readonly property color color: (widgetData && widgetData.color !== undefined) ? widgetData.color : Color.mPrimary
|
||||
readonly property string layout: (widgetData && widgetData.layout !== undefined) ? widgetData.layout : (widgetMetadata.layout !== undefined ? widgetMetadata.layout : "side")
|
||||
|
||||
// Fixed colors
|
||||
readonly property color color: Color.mPrimary
|
||||
readonly property color color2: Color.mSecondary
|
||||
|
||||
// Legend items model - each item has: text, color, icon (optional), bold (optional), opacity (optional), elide (optional)
|
||||
readonly property var legendItems: {
|
||||
switch (root.statType) {
|
||||
@@ -36,7 +39,7 @@ DraggableDesktopWidget {
|
||||
{
|
||||
icon: "cpu-temperature",
|
||||
text: SystemStatService.cpuTemp + "°C",
|
||||
color: Color.mError
|
||||
color: root.color2
|
||||
}
|
||||
];
|
||||
case "GPU":
|
||||
@@ -82,7 +85,7 @@ DraggableDesktopWidget {
|
||||
{
|
||||
icon: "upload-speed",
|
||||
text: SystemStatService.formatSpeed(SystemStatService.txSpeed),
|
||||
color: Color.mError
|
||||
color: root.color2
|
||||
}
|
||||
];
|
||||
default:
|
||||
@@ -189,7 +192,7 @@ DraggableDesktopWidget {
|
||||
minValue2: root.graphMinValue2
|
||||
maxValue2: root.graphMaxValue2
|
||||
color: root.color
|
||||
color2: Color.mError
|
||||
color2: root.color2
|
||||
fill: true
|
||||
updateInterval: root.graphUpdateInterval
|
||||
animateScale: root.statType === "Network"
|
||||
|
||||
@@ -134,7 +134,7 @@ SmartPanel {
|
||||
minValue2: Math.max(SystemStatService.cpuTempHistoryMin - 5, 0)
|
||||
maxValue2: Math.max(SystemStatService.cpuTempHistoryMax + 5, 1)
|
||||
color: Color.mPrimary
|
||||
color2: Color.mError
|
||||
color2: Color.mSecondary
|
||||
fill: true
|
||||
fillOpacity: 0.15
|
||||
updateInterval: Settings.data.systemMonitor.cpuPollingInterval
|
||||
@@ -264,7 +264,7 @@ SmartPanel {
|
||||
minValue2: 0
|
||||
maxValue2: SystemStatService.txMaxSpeed
|
||||
color: Color.mPrimary
|
||||
color2: Color.mError
|
||||
color2: Color.mSecondary
|
||||
fill: true
|
||||
fillOpacity: 0.15
|
||||
updateInterval: Settings.data.systemMonitor.networkPollingInterval
|
||||
|
||||
Reference in New Issue
Block a user