anton/slope clocks: pass `redraw` to allow `Bangle.uiRedraw()`

master
Rob Pilling 2025-08-17 20:36:13 +01:00 committed by Bryan
parent 15c7467985
commit 01fe571f74
9 changed files with 14 additions and 6 deletions

View File

@ -14,3 +14,4 @@
0.10: Use Bangle.setUI({remove:...}) to allow loading the launcher without a full reset on 2v16 0.10: Use Bangle.setUI({remove:...}) to allow loading the launcher without a full reset on 2v16
0.11: Moved enhanced Anton clock to 'Anton Clock Plus' and stripped this clock back down to make it faster for new users (270ms -> 170ms) 0.11: Moved enhanced Anton clock to 'Anton Clock Plus' and stripped this clock back down to make it faster for new users (270ms -> 170ms)
Modified to avoid leaving functions defined when using setUI({remove:...}) Modified to avoid leaving functions defined when using setUI({remove:...})
0.12: Pass in `redraw` to allow `Bangle.uiRedraw()` to redraw the clock

View File

@ -37,7 +37,9 @@ Bangle.setUI({
if (drawTimeout) clearTimeout(drawTimeout); if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined; drawTimeout = undefined;
delete Graphics.prototype.setFontAnton; delete Graphics.prototype.setFontAnton;
}}); },
redraw: draw,
});
// Load widgets // Load widgets
Bangle.loadWidgets(); Bangle.loadWidgets();
draw(); draw();

View File

@ -1,7 +1,7 @@
{ {
"id": "antonclk", "id": "antonclk",
"name": "Anton Clock", "name": "Anton Clock",
"version": "0.11", "version": "0.12",
"description": "A simple clock using the bold Anton font. See `Anton Clock Plus` for an enhanced version", "description": "A simple clock using the bold Anton font. See `Anton Clock Plus` for an enhanced version",
"icon": "app.png", "icon": "app.png",
"screenshots": [{"url":"screenshot.png"}], "screenshots": [{"url":"screenshot.png"}],

View File

@ -14,3 +14,4 @@
0.10: Use Bangle.setUI({remove:...}) to allow loading the launcher without a full reset on 2v16 0.10: Use Bangle.setUI({remove:...}) to allow loading the launcher without a full reset on 2v16
Modified to avoid leaving functions defined when using setUI({remove:...}) Modified to avoid leaving functions defined when using setUI({remove:...})
0.11: Minor code improvements 0.11: Minor code improvements
0.12: Pass in `redraw` to allow `Bangle.uiRedraw()` to redraw the clock

View File

@ -231,7 +231,9 @@ Bangle.setUI({
drawTimeout = undefined; drawTimeout = undefined;
delete Graphics.prototype.setFontAnton; delete Graphics.prototype.setFontAnton;
delete Graphics.prototype.setFontAntonSmall; delete Graphics.prototype.setFontAntonSmall;
}}); },
redraw: draw,
});
// Load widgets // Load widgets
Bangle.loadWidgets(); Bangle.loadWidgets();
Bangle.drawWidgets(); Bangle.drawWidgets();

View File

@ -2,7 +2,7 @@
"id": "antonclkplus", "id": "antonclkplus",
"name": "Anton Clock Plus", "name": "Anton Clock Plus",
"shortName": "Anton Clock+", "shortName": "Anton Clock+",
"version": "0.11", "version": "0.12",
"description": "A clock using the bold Anton font, optionally showing seconds and date in ISO-8601 format.", "description": "A clock using the bold Anton font, optionally showing seconds and date in ISO-8601 format.",
"readme":"README.md", "readme":"README.md",
"icon": "app.png", "icon": "app.png",

View File

@ -12,3 +12,4 @@
0.09: Use clock_info module as an app 0.09: Use clock_info module as an app
0.10: Option to hide widgets, tweak top widget width to avoid overlap with hour text at 9am 0.10: Option to hide widgets, tweak top widget width to avoid overlap with hour text at 9am
0.11: Avoid rendering clkinfo in the same colour as the background 0.11: Avoid rendering clkinfo in the same colour as the background
0.12: Pass in `redraw` to allow `Bangle.uiRedraw()` to redraw the clock

View File

@ -169,7 +169,8 @@ Bangle.setUI({
delete clockInfoMenu; delete clockInfoMenu;
clockInfoMenu2.remove(); clockInfoMenu2.remove();
delete clockInfoMenu2; delete clockInfoMenu2;
} },
redraw: draw,
}); });
// Load widgets // Load widgets
Bangle.loadWidgets(); Bangle.loadWidgets();

View File

@ -1,6 +1,6 @@
{ "id": "slopeclockpp", { "id": "slopeclockpp",
"name": "Slope Clock ++", "name": "Slope Clock ++",
"version":"0.11", "version":"0.12",
"description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen. This is a clone of the original Slope Clock which shows extra information and allows the colors to be selected.", "description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen. This is a clone of the original Slope Clock which shows extra information and allows the colors to be selected.",
"icon": "app.png", "icon": "app.png",
"screenshots": [{"url":"screenshot.png"}], "screenshots": [{"url":"screenshot.png"}],