mirror of https://github.com/espruino/BangleApps
make width smaller, default to not having width
parent
cf36400faa
commit
9ad0ccd1bf
|
@ -4682,7 +4682,7 @@
|
|||
"icon": "widget.png",
|
||||
"version":"0.1.0",
|
||||
"type": "widget",
|
||||
"description": "A simple widget that shows up whenever the watch starts charging.",
|
||||
"description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see if the watch is charging at a glance, no matter which battery widget is being used.",
|
||||
"tags": "widget",
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"storage": [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(() => {
|
||||
const icon = require("heatshrink").decompress(atob("kEggIEBoAIC4ADFgIDCgYDDwADBg4DGh4DGj4DCn4DD/4gBv4DEBgP//4PBAYUB//+GQIDE/hDCAYf4AY3wAYXgAYxfHIYQDEOQUCAQI"));
|
||||
const icon = require("heatshrink").decompress(atob("ikggMAiEAgYIBmEAg4EB+EAh0AgPggEeCAIEBnwQBAgP+gEP//x///j//8f//k///H//4BYOP/4lBv4bDvwEB4EAvAEBwEAuA7DCAI7BgAQBhEAA"));
|
||||
|
||||
function draw() {
|
||||
g.reset();
|
||||
|
@ -13,14 +13,14 @@
|
|||
|
||||
WIDGETS.chargingStatus = {
|
||||
area: 'tr',
|
||||
width: 22,
|
||||
width: Bangle.isCharging() ? 20 : 0,
|
||||
draw: draw,
|
||||
};
|
||||
|
||||
Bangle.on('charging', (charging) => {
|
||||
if (charging) {
|
||||
Bangle.buzz();
|
||||
WIDGETS.chargingStatus.width = 22;
|
||||
WIDGETS.chargingStatus.width = 20;
|
||||
} else {
|
||||
WIDGETS.chargingStatus.width = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue