mirror of https://github.com/espruino/BangleApps
Merge pull request #2801 from stweedo/widbt
[widbt] - fixes widget not showing on blue backgroundpull/2802/head
commit
3b14f06dc9
|
@ -5,3 +5,4 @@
|
|||
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.09: Fix widget not showing on blue background
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "widbt",
|
||||
"name": "Bluetooth Widget",
|
||||
"version": "0.08",
|
||||
"version": "0.09",
|
||||
"description": "Show the current Bluetooth connection status in the top right of the clock",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
WIDGETS["bluetooth"]={area:"tr",width:15,draw:function() {
|
||||
g.reset();
|
||||
if (NRF.getSecurityStatus().connected)
|
||||
if (NRF.getSecurityStatus().connected) {
|
||||
if (g.getBgColor() === 31) { // If background color is blue use cyan instead
|
||||
g.setColor("#0ff");
|
||||
} else {
|
||||
g.setColor((g.getBPP()>8) ? "#07f" : (g.theme.dark ? "#0ff" : "#00f"));
|
||||
else
|
||||
}
|
||||
} else {
|
||||
g.setColor(g.theme.dark ? "#666" : "#999");
|
||||
}
|
||||
g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),2+this.x,2+this.y);
|
||||
},changed:function() {
|
||||
WIDGETS["bluetooth"].draw();
|
||||
|
|
Loading…
Reference in New Issue