mirror of https://github.com/espruino/BangleApps
Merge branch 'master' of github.com:espruino/BangleApps
commit
dea770cb91
|
@ -2,3 +2,4 @@
|
|||
0.02: Wrap loadWidgets instead of replacing to keep original functionality intact
|
||||
Change back entry to menu option
|
||||
Allow changing widgets into all areas, including bottom widget bar
|
||||
0.03: Fix editing widgets whose draw method takes the widget
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "wid_edit",
|
||||
"version": "0.02",
|
||||
"version": "0.03",
|
||||
"name": "Widget Editor",
|
||||
"icon": "icon.png",
|
||||
"description": "Customize widget locations",
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
function highlight() {
|
||||
if (WIDGET.width > 0) {
|
||||
// draw widget, then draw a highlighted border on top
|
||||
WIDGET.draw();
|
||||
WIDGET.draw(WIDGET);
|
||||
g.setColor(g.theme.fgH)
|
||||
.drawRect(WIDGET.x, WIDGET.y, WIDGET.x+WIDGET.width-1, WIDGET.y+23);
|
||||
} else {
|
||||
|
|
|
@ -10,3 +10,4 @@
|
|||
Redraw only every hour when no alarm in next 24h
|
||||
0.07: Fix when no alarms are present
|
||||
0.08: Selectable font. Allow to disable hour padding.
|
||||
0.09: Match draw() API e.g. to allow wid_edit to alter this widget
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "widalarmeta",
|
||||
"name": "Alarm & Timer ETA",
|
||||
"shortName": "Alarm ETA",
|
||||
"version": "0.08",
|
||||
"version": "0.09",
|
||||
"description": "A widget that displays the time to the next Alarm or Timer in hours and minutes, maximum 24h (configurable).",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
}
|
||||
} // getNextAlarm
|
||||
|
||||
function draw(fromInterval) {
|
||||
function draw(_w, fromInterval) {
|
||||
if (this.nextAlarm === undefined) {
|
||||
let alarm = getNextAlarm();
|
||||
if (alarm === undefined) {
|
||||
|
@ -101,8 +101,9 @@
|
|||
clearTimeout(this.timeoutId);
|
||||
}
|
||||
this.timeoutId = setTimeout(()=>{
|
||||
WIDGETS["widalarmeta"].timeoutId = undefined;
|
||||
WIDGETS["widalarmeta"].draw(true);
|
||||
var w = WIDGETS["widalarmeta"];
|
||||
w.timeoutId = undefined;
|
||||
w.draw(w, true);
|
||||
}, timeout);
|
||||
} /* draw */
|
||||
|
||||
|
|
|
@ -16,3 +16,4 @@
|
|||
0.17: Add option 'Remove Jitter'='Drop only' to prevent percentage from getting up again when not charging
|
||||
Add option to disable vibration when charger connects
|
||||
0.18: Only redraw when values change
|
||||
0.19: Match draw() API e.g. to allow wid_edit to alter this widget
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "widbatpc",
|
||||
"name": "Battery Level Widget (with percentage)",
|
||||
"shortName": "Battery Widget",
|
||||
"version": "0.18",
|
||||
"version": "0.19",
|
||||
"description": "Show the current battery level and charging status in the top right of the clock, with charge percentage",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
if (on) update();
|
||||
});
|
||||
|
||||
var id = setInterval(()=>WIDGETS["batpc"].draw(true), intervalLow);
|
||||
var id = setInterval(()=>WIDGETS["batpc"].draw(WIDGETS["batpc"], true), intervalLow);
|
||||
|
||||
WIDGETS["batpc"]={area:"tr",width:40,draw:draw,reload:reload};
|
||||
setWidth();
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
Remove library stub
|
||||
0.03: Fix messages not showing if UI auto-open is disabled
|
||||
0.04: Now shows message icons again (#2416)
|
||||
0.05: Match draw() API e.g. to allow wid_edit to alter this widget
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "widmessages",
|
||||
"name": "Message Widget",
|
||||
"version": "0.04",
|
||||
"version": "0.05",
|
||||
"description": "Widget showing new messages",
|
||||
"icon": "app.png",
|
||||
"type": "widget",
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// the name still needs to be "messages": the library calls WIDGETS["messages'].hide()/show()
|
||||
// see e.g. widmsggrid
|
||||
WIDGETS["messages"] = {
|
||||
area: "tl", width: 0, srcs: [], draw: function(recall) {
|
||||
area: "tl", width: 0, srcs: [], draw: function(_w, recall) {
|
||||
// If we had a setTimeout queued from the last time we were called, remove it
|
||||
if (WIDGETS["messages"].i) {
|
||||
clearTimeout(WIDGETS["messages"].i);
|
||||
|
@ -42,7 +42,7 @@
|
|||
this.x+12+i*24, this.y+12, {rotate: 0/*force centering*/});
|
||||
}
|
||||
}
|
||||
WIDGETS["messages"].i = setTimeout(() => WIDGETS["messages"].draw(true), 1000);
|
||||
WIDGETS["messages"].i = setTimeout(() => WIDGETS["messages"].draw(WIDGETS["messages"], true), 1000);
|
||||
if (process.env.HWVERSION>1) Bangle.on("touch", this.touch);
|
||||
}, onMsg: function(type, msg) {
|
||||
if (this.hidden) return;
|
||||
|
|
Loading…
Reference in New Issue