another attempt to use icon correctly

master
Sebastian Di Luzio 2021-12-04 22:22:22 +01:00
parent c7aea28a47
commit 1d7a69ce0a
2 changed files with 7 additions and 5 deletions

View File

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

View File

@ -7,13 +7,15 @@
g.flip(); g.flip();
}); });
const icon = require("heatshrink").decompress(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="))
function draw() { function draw() {
g.reset(); g.reset();
g.setColor("#FD0"); g.setColor("#FD0");
g.setFont("Vector", 26); //g.setFont("Vector", 26);
//if (Bangle.isCharging()) { //if (Bangle.isCharging()) {
// g.drawImage(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="), this.x, this.y); g.drawImage(icon, this.x, this.y);
g.drawString('PWR',this.x,this.y) //g.drawString('PWR', this.x, this.y)
//} //}
} }