Skip to content

Commit c3f6264

Browse files
authored
Update widget.js
1 parent aad30da commit c3f6264

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/wid_a_battery_widget/widget.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
const intervalHigh = 2000; // update time when charging
44

55
let COLORS = {
6-
'white': g.theme.dark ? "#000" : "#fff",
7-
'black': g.theme.dark ? "#fff" : "#000",
6+
'bg': g.theme.bg,
7+
'fg': g.theme.fg,
88
'charging': "#08f",
99
'high': g.theme.dark ? "#fff" : "#000",
1010
'low': "#f00",
@@ -24,7 +24,7 @@
2424

2525
let xl = x+4+l*(s-12)/100;
2626

27-
g.setColor(COLORS.white);
27+
g.setColor(COLORS.bg);
2828
g.fillRect(x+2,y+5,x+s-6,y+18);
2929

3030
g.setColor(levelColor(l));
@@ -35,7 +35,7 @@
3535
g.fillRect(x+s-3,y+8,x+s-2,y+16); // tip of the battery
3636
g.fillRect(x+4,y+15,xl,y+16); // charging bar
3737

38-
g.setColor(COLORS.black);
38+
g.setColor(COLORS.fg);
3939
g.setFontAlign(0,0);
4040
g.setFont('6x8');
4141
g.drawString(l, x + 14, y + 10);

0 commit comments

Comments
 (0)