invert timemaster gauge color
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -422,7 +422,7 @@ class TimemasterAction extends ActionBase {
|
|||||||
if (pct > 0) {
|
if (pct > 0) {
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(cx, cy, r, startAngle, Math.min(valueAngle, greenEnd), false);
|
ctx.arc(cx, cy, r, startAngle, Math.min(valueAngle, greenEnd), false);
|
||||||
ctx.strokeStyle = '#4caf50';
|
ctx.strokeStyle = '#f44336';
|
||||||
ctx.lineWidth = lw;
|
ctx.lineWidth = lw;
|
||||||
ctx.lineCap = 'round';
|
ctx.lineCap = 'round';
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
@@ -438,14 +438,14 @@ class TimemasterAction extends ActionBase {
|
|||||||
if (pct > yellow75h) {
|
if (pct > yellow75h) {
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(cx, cy, r, yellowEnd, valueAngle, false);
|
ctx.arc(cx, cy, r, yellowEnd, valueAngle, false);
|
||||||
ctx.strokeStyle = '#f44336';
|
ctx.strokeStyle = '#4caf50';
|
||||||
ctx.lineWidth = lw;
|
ctx.lineWidth = lw;
|
||||||
ctx.lineCap = 'butt';
|
ctx.lineCap = 'butt';
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
|
|
||||||
const working = !this.geht;
|
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.fillStyle = working ? color : '#888888';
|
||||||
ctx.font = 'bold 44px "Source Han Sans SC"';
|
ctx.font = 'bold 44px "Source Han Sans SC"';
|
||||||
|
|||||||
Reference in New Issue
Block a user