forked from FOSS/BangleApps
widbars - Set battery bar color on load
parent
5c110a89fb
commit
a06f8d28a6
|
@ -1,3 +1,4 @@
|
|||
0.01: New Widget!
|
||||
0.02: Battery bar turns yellow on charge
|
||||
Memory status bar does not trigger garbage collect
|
||||
0.03: Set battery color on load
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "widbars",
|
||||
"name": "Bars Widget",
|
||||
"version": "0.02",
|
||||
"version": "0.03",
|
||||
"description": "Display several measurements as vertical bars.",
|
||||
"icon": "icon.png",
|
||||
"screenshots": [{"url":"screenshot.png"}],
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
if (top) g .clearRect(x,y, x+w-1,y+top-1); // erase above bar
|
||||
if (f) g.setColor(col).fillRect(x,y+top, x+w-1,y+h-1); // even for f=0.001 this is still 1 pixel high
|
||||
}
|
||||
let batColor='#0f0';
|
||||
let batColor=Bangle.isCharging()?'#ff0':'#0f0';
|
||||
function draw() {
|
||||
g.reset();
|
||||
const x = this.x, y = this.y,
|
||||
|
|
Loading…
Reference in New Issue