ngraph: dont force mError as secondary color - avoid two red curves on redish themes.

This commit is contained in:
Lemmy
2026-02-06 10:16:33 -05:00
parent 395ba7fec1
commit 103ef53ff1
3 changed files with 9 additions and 12 deletions
@@ -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"