attempt to use correct image for rendering

pull/1003/head
Sebastian Di Luzio 2021-12-04 20:44:17 +01:00
parent c2b731a972
commit 67c72d337e
2 changed files with 12 additions and 4 deletions

View File

@ -4680,7 +4680,7 @@
"name": "Charging Status",
"shortName":"ChargingStatus",
"icon": "widget.png",
"version":"0.1.5",
"version":"0.1.6",
"type": "widget",
"description": "A simple widget that shows up whenever the watch starts charging.",
"tags": "widget,battery",

View File

@ -7,17 +7,25 @@
g.flip();
});
const chargingSymbol = {
width: 16,
height: 16,
bpp: 1,
transparent: 1,
buffer: require("heatshrink").decompress(atob("/9/AIP+v/8AIP//ABBg/wh4BB8Ef/4BBn/+AIIXB/4BB"))
};
function draw() {
g.reset();
g.setColor("#FD0"); // on = amber
g.setColor("#FD0");
//if (Bangle.isCharging()) {
g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y);
g.drawImage(chargingSymbol, this.x + 2, this.y);
//}
}
WIDGETS.chargingStatus = {
area: 'tr',
width: 32,
width: 20,
draw: draw,
};