Update widget.js
parent
aad30da1e7
commit
c3f6264935
|
|
@ -3,8 +3,8 @@
|
||||||
const intervalHigh = 2000; // update time when charging
|
const intervalHigh = 2000; // update time when charging
|
||||||
|
|
||||||
let COLORS = {
|
let COLORS = {
|
||||||
'white': g.theme.dark ? "#000" : "#fff",
|
'bg': g.theme.bg,
|
||||||
'black': g.theme.dark ? "#fff" : "#000",
|
'fg': g.theme.fg,
|
||||||
'charging': "#08f",
|
'charging': "#08f",
|
||||||
'high': g.theme.dark ? "#fff" : "#000",
|
'high': g.theme.dark ? "#fff" : "#000",
|
||||||
'low': "#f00",
|
'low': "#f00",
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
let xl = x+4+l*(s-12)/100;
|
let xl = x+4+l*(s-12)/100;
|
||||||
|
|
||||||
g.setColor(COLORS.white);
|
g.setColor(COLORS.bg);
|
||||||
g.fillRect(x+2,y+5,x+s-6,y+18);
|
g.fillRect(x+2,y+5,x+s-6,y+18);
|
||||||
|
|
||||||
g.setColor(levelColor(l));
|
g.setColor(levelColor(l));
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
g.fillRect(x+s-3,y+8,x+s-2,y+16); // tip of the battery
|
g.fillRect(x+s-3,y+8,x+s-2,y+16); // tip of the battery
|
||||||
g.fillRect(x+4,y+15,xl,y+16); // charging bar
|
g.fillRect(x+4,y+15,xl,y+16); // charging bar
|
||||||
|
|
||||||
g.setColor(COLORS.black);
|
g.setColor(COLORS.fg);
|
||||||
g.setFontAlign(0,0);
|
g.setFontAlign(0,0);
|
||||||
g.setFont('6x8');
|
g.setFont('6x8');
|
||||||
g.drawString(l, x + 14, y + 10);
|
g.drawString(l, x + 14, y + 10);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue