prepare first release

master
Sebastian Di Luzio 2021-12-04 22:37:16 +01:00
parent 1a320a56c7
commit cf36400faa
3 changed files with 19 additions and 19 deletions

View File

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

View File

@ -1 +1 @@
0.1: First release.
0.1.0: First release.

View File

@ -1,30 +1,30 @@
(() => {
Bangle.on('charging', (charging) => {
if (charging) {
Bangle.buzz();
}
Bangle.drawWidgets(); // re-layout widgets
g.flip();
});
const icon = require("heatshrink").decompress(atob("kEggIEBoAIC4ADFgIDCgYDDwADBg4DGh4DGj4DCn4DD/4gBv4DEBgP//4PBAYUB//+GQIDE/hDCAYf4AY3wAYXgAYxfHIYQDEOQUCAQI"));
function draw() {
g.reset();
if (Bangle.isCharging()) {
g.setColor("#FD0");
//if (Bangle.isCharging()) {
g.drawImage(icon, this.x, this.y + 2, {
scale: 0.8125
g.drawImage(icon, this.x, this.y + 1, {
scale: 0.6875
});
//}
}
}
WIDGETS.chargingStatus = {
area: 'tr',
width: 26,
width: 22,
draw: draw,
};
Bangle.on('charging', (charging) => {
if (charging) {
Bangle.buzz();
WIDGETS.chargingStatus.width = 22;
} else {
WIDGETS.chargingStatus.width = 0;
}
Bangle.drawWidgets(); // re-layout widgets
g.flip();
});
})();