mirror of https://github.com/espruino/BangleApps
0.08: Don't completely remove the lock widget when screen unlocked (use 1px) to ensure appRect/drawWidgets still thinks there are widgets (fix #2409, #2413)
parent
5b6eed5f9c
commit
39418b43dd
|
@ -5,3 +5,4 @@
|
|||
0.05: Set sortorder to -10 so that others can take -1 etc
|
||||
0.06: Set sortorder to -10 in widget code
|
||||
0.07: Remove check for .isLocked (extremely old firmwares), speed up widget loading
|
||||
0.08: Don't completely remove the lock widget when screen unlocked (use 1px) to ensure appRect/drawWidgets still thinks there are widgets
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "widlock",
|
||||
"name": "Lock Widget",
|
||||
"version": "0.07",
|
||||
"version": "0.08",
|
||||
"description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Bangle.on("lock", function() {
|
||||
WIDGETS["lock"].width = Bangle.isLocked()?16:0;
|
||||
WIDGETS["lock"].width = Bangle.isLocked()?16:1;
|
||||
Bangle.drawWidgets();
|
||||
});
|
||||
WIDGETS["lock"]={area:"tl",sortorder:10,width:Bangle.isLocked()?16:0,draw:function(w) {
|
||||
WIDGETS["lock"]={area:"tl",sortorder:10,width:Bangle.isLocked()?16:1,draw:function(w) {
|
||||
if (Bangle.isLocked())
|
||||
g.reset().drawImage(atob("DhABH+D/wwMMDDAwwMf/v//4f+H/h/8//P/z///f/g=="), w.x+1, w.y+4);
|
||||
}};
|
||||
|
|
Loading…
Reference in New Issue