Clock apps tell clock widgets to hide #6

pull/2113/head
thyttan 2022-09-07 00:57:47 +02:00
parent 4097f19d4e
commit ab15ed66a2
18 changed files with 43 additions and 37 deletions

View File

@ -1 +1,2 @@
0.01: first release
0.02: Tell clock widgets to hide.

View File

@ -2,7 +2,7 @@
"id": "pebbled",
"name": "Pebble Clock with distance",
"shortName": "Pebble + distance",
"version": "0.01",
"version": "0.02",
"description": "Fork of Pebble Clock with distance in KM. Both step count and the distance are on the main screen. Default step length = 0.75m (can be changed in settings).",
"readme": "README.md",
"icon": "pebbled.png",

View File

@ -115,6 +115,7 @@ function getSteps() {
return '0';
}
Bangle.setUI("clock");
g.clear();
Bangle.loadWidgets();
/*
@ -126,4 +127,3 @@ for (let wd of WIDGETS) {wd.draw=()=>{};wd.area="";}
loadSettings();
setInterval(draw, 15000); // refresh every 15s
draw();
Bangle.setUI("clock");

View File

@ -5,3 +5,4 @@
0.05: Changes which circle show minutes and seconds
0.06: Avoid function wrapper, use setUI for launcher
Clock face smaller so no longer breaks widgets
0.07: Tell clock widgets to hide.

View File

@ -2,7 +2,7 @@
"id": "rclock",
"name": "Round clock with seconds, minutes and date",
"shortName": "Round Clock",
"version": "0.06",
"version": "0.07",
"description": "Designed round clock with ticks for minutes and seconds and heart rate indication",
"icon": "app.png",
"type": "clock",

View File

@ -196,6 +196,9 @@ const drawHR = function () {
}
};
// Show launcher when button pressed
Bangle.setUI("clock");
// clean app screen
g.clear();
Bangle.loadWidgets();
@ -222,5 +225,3 @@ Bangle.on('HRM', function (d) {
// draw now
drawClock();
// Show launcher when button pressed
Bangle.setUI("clock");

View File

@ -6,4 +6,5 @@
0.06: Add 12h support and autocycle control
0.07: added localization, removed deprecated code
0.08: removed unused font, fix autocycle, imported suncalc and trimmed, removed pedometer dependency, "tap to cycle" setting
0.09: fix battery icon size
0.09: fix battery icon size
0.10: Tell clock widgets to hide.

View File

@ -2,7 +2,7 @@
"id": "rebble",
"name": "Rebble Clock",
"shortName": "Rebble",
"version": "0.09",
"version": "0.10",
"description": "A Pebble style clock, with configurable background, three sidebars including steps, day, date, sunrise, sunset, long live the rebellion",
"readme": "README.md",
"icon": "rebble.png",

View File

@ -292,18 +292,6 @@ function queueDraw() {
log_debug("starting..");
g.clear();
Bangle.loadWidgets();
/*
* we are not drawing the widgets as we are taking over the whole screen
* so we will blank out the draw() functions of each widget and change the
* area to the top bar doesn't get cleared.
*/
for (let wd of WIDGETS) {wd.draw=()=>{};wd.area="";}
loadSettings();
loadLocation();
if(settings.autoCycle || settings.sideTap==0)
{
@ -318,6 +306,19 @@ else{
}
g.clear();
Bangle.loadWidgets();
/*
* we are not drawing the widgets as we are taking over the whole screen
* so we will blank out the draw() functions of each widget and change the
* area to the top bar doesn't get cleared.
*/
for (let wd of WIDGETS) {wd.draw=()=>{};wd.area="";}
loadSettings();
loadLocation();
draw(); // queues the next draw for a minutes time
@ -331,4 +332,4 @@ Bangle.on('charging', function(charging) {
drawSideBar2();
break;
}
});
});

View File

@ -2,3 +2,4 @@
0.02: Minor tweaks for light theme
0.03: Made images 2 bit and fixed theme honoring
0.04: Fixed date font alignment and changed date font to match a real Rolex
0.05: Tell clock widget to hide.

View File

@ -44,7 +44,9 @@ let cx = W/2;
let cy = H/2;
let Timeout;
Bangle.loadWidgets();
Bangle.setUI("clock");
// load widgets after 'setUI' so they're aware there is a clock active
Bangle.loadWidgets();
/* Custom version of Bangle.drawWidgets (does not clear the widget areas) Thanks to rozek */
@ -142,8 +144,4 @@ Bangle.on('lcdPower', (on) => {
displayRefresh();
}
});
Bangle.setUI("clock");
// load widgets after 'setUI' so they're aware there is a clock active
Bangle.loadWidgets();
displayRefresh();
displayRefresh();

View File

@ -3,7 +3,7 @@
"shortName":"rolex",
"icon": "rolex.png",
"screenshots": [{"url":"screenshot1.png"}],
"version":"0.04",
"version":"0.05",
"description": "A rolex like watch face",
"tags": "clock",
"type": "clock",

View File

@ -1,2 +1,3 @@
0.01: Initial Release
0.02: Shrink hand images to save memory
0.03: Tell clock widgets to hide.

View File

@ -52,7 +52,9 @@ let cx = W/2;
let cy = H/2;
let Timeout;
Bangle.loadWidgets();
Bangle.setUI("clock");
// load widgets after 'setUI' so they're aware there is a clock active
Bangle.loadWidgets();
/* Custom version of Bangle.drawWidgets (does not clear the widget areas) Thanks to rozek */
@ -175,7 +177,4 @@ Bangle.on('lcdPower', (on) => {
}
});
Bangle.setUI("clock");
// load widgets after 'setUI' so they're aware there is a clock active
Bangle.loadWidgets();
displayRefresh();

View File

@ -3,7 +3,7 @@
"shortName":"5actus",
"icon": "seiko-5actus.png",
"screenshots": [{"url":"screenshot.png"}],
"version":"0.02",
"version":"0.03",
"description": "A watch designed after then Seiko 5actus from the 1970's",
"tags": "clock",
"type": "clock",

View File

@ -7,3 +7,4 @@
0.07: Support for Bangle.js 2 and themes
0.08: Removed "wake LCD on face-up"-feature: A watch-face should not set things like "wake LCD on face-up".
0.09: Added button control toggle and other live controls to new settings screen.
0.10: Tell clock widgets to hide.

View File

@ -1,7 +1,7 @@
{
"id": "slidingtext",
"name": "Sliding Clock",
"version": "0.09",
"version": "0.10",
"description": "Inspired by the Pebble sliding clock, old times are scrolled off the screen and new times on. You are also able to change language on the fly so you can see the time written in other languages using button 1. Currently English, French, Japanese, Spanish and German are supported",
"icon": "slidingtext.png",
"type": "clock",

View File

@ -647,12 +647,13 @@ Bangle.on('lcdPower', (on) => {
g.clear();
load_settings();
Bangle.loadWidgets();
Bangle.drawWidgets();
startTimers();
// Show launcher when button pressed
Bangle.setUI("clockupdown", d=>{
if (d<0) button1pressed();
if (d>0) button3pressed();
});
Bangle.loadWidgets();
Bangle.drawWidgets();
startTimers();