invert timemaster gauge color

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2026-04-20 20:26:41 +02:00
parent 1ad111159b
commit 7c20d24506
+3 -3
View File
@@ -422,7 +422,7 @@ class TimemasterAction extends ActionBase {
if (pct > 0) {
ctx.beginPath();
ctx.arc(cx, cy, r, startAngle, Math.min(valueAngle, greenEnd), false);
ctx.strokeStyle = '#4caf50';
ctx.strokeStyle = '#f44336';
ctx.lineWidth = lw;
ctx.lineCap = 'round';
ctx.stroke();
@@ -438,14 +438,14 @@ class TimemasterAction extends ActionBase {
if (pct > yellow75h) {
ctx.beginPath();
ctx.arc(cx, cy, r, yellowEnd, valueAngle, false);
ctx.strokeStyle = '#f44336';
ctx.strokeStyle = '#4caf50';
ctx.lineWidth = lw;
ctx.lineCap = 'butt';
ctx.stroke();
}
const working = !this.geht;
const color = pct <= green6h ? '#4caf50' : pct <= yellow75h ? '#ffeb3b' : '#f44336';
const color = pct <= green6h ? '#f44336' : pct <= yellow75h ? '#ffeb3b' : '#4caf50';
ctx.fillStyle = working ? color : '#888888';
ctx.font = 'bold 44px "Source Han Sans SC"';