mirror of https://github.com/espruino/BangleApps
widbt: recover original widbt
parent
a9839bed9e
commit
2c1a4e3003
|
@ -0,0 +1,7 @@
|
|||
0.02: Tweaks for variable size widget system
|
||||
0.03: Ensure redrawing works with variable size widget system
|
||||
0.04: Fix automatic update of Bluetooth connection status
|
||||
0.05: Make Bluetooth widget thinner, and when on a bright theme use light grey for disabled color
|
||||
0.06: Tweaking colors for dark/light themes and low bpp screens
|
||||
0.07: Memory usage improvements
|
||||
0.08: Disable LCD on, on bluetooth status change
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"id": "widbt",
|
||||
"name": "Bluetooth Widget",
|
||||
"version": "0.08",
|
||||
"description": "Show the current Bluetooth connection status in the top right of the clock",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
"tags": "widget,bluetooth",
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"storage": [
|
||||
{"name":"widbt.wid.js","url":"widget.js"}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
WIDGETS["bluetooth"]={area:"tr",width:15,draw:function() {
|
||||
g.reset();
|
||||
if (NRF.getSecurityStatus().connected)
|
||||
g.setColor((g.getBPP()>8) ? "#07f" : (g.theme.dark ? "#0ff" : "#00f"));
|
||||
else
|
||||
g.setColor(g.theme.dark ? "#666" : "#999");
|
||||
g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),2+this.x,2+this.y);
|
||||
},changed:function() {
|
||||
WIDGETS["bluetooth"].draw();
|
||||
}};
|
||||
NRF.on('connect',WIDGETS["bluetooth"].changed);
|
||||
NRF.on('disconnect',WIDGETS["bluetooth"].changed);
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue