From a35d5afec08e4854723636b95d47198b7533e9e6 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 15 Feb 2022 09:20:07 +0000 Subject: [PATCH] oops - commit changed rolex files --- apps/rolex/ChangeLog | 3 ++- apps/rolex/app.js | 19 +++++++++++-------- apps/rolex/metadata.json | 32 ++++++++++++++++---------------- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/apps/rolex/ChangeLog b/apps/rolex/ChangeLog index a899bfcda..283856aed 100644 --- a/apps/rolex/ChangeLog +++ b/apps/rolex/ChangeLog @@ -1 +1,2 @@ -0.01 Initial Release +0.01: Initial Release +0.02: Minor tweaks for light theme diff --git a/apps/rolex/app.js b/apps/rolex/app.js index adfe8a2c7..f8db71638 100644 --- a/apps/rolex/app.js +++ b/apps/rolex/app.js @@ -1,5 +1,3 @@ -/* Set background image */ - var imgBg = { width : 176, height : 176, bpp : 8, transparent : 254, @@ -113,9 +111,7 @@ function drawHands() { } function drawBackground() { - g.setBgColor(0,0,0); - g.setColor(1,1,1); - g.clear(); + g.clear(1); g.drawImage(imgBg,0,0); g.reset(); } @@ -131,7 +127,6 @@ function displayRefresh() { let Pause = 1000 - (Date.now() % 1000); Timeout = setTimeout(displayRefresh,Pause); } -setTimeout(displayRefresh,500); Bangle.on('lcdPower', (on) => { if (on) { @@ -140,5 +135,13 @@ Bangle.on('lcdPower', (on) => { } }); -Bangle.loadWidgets(); -Bangle.setUI("clock"); \ No newline at end of file +g.setTheme({ + bg : 0, fg : "#fff", dark:true, + bg2 : 0, fg2 : "#fff", + bgH : "#00f", fgH : "#fff", +}); +Bangle.setUI("clock"); +// load widgets after 'setUI' so they're aware there is a clock active +Bangle.loadWidgets(); +displayRefresh(); + diff --git a/apps/rolex/metadata.json b/apps/rolex/metadata.json index 2c4437b35..d7be25508 100644 --- a/apps/rolex/metadata.json +++ b/apps/rolex/metadata.json @@ -1,17 +1,17 @@ { "id": "rolex", - "name": "rolex", - "shortName":"rolex", - "icon": "rolex.png", - "screenshots": [{"url":"screenshot.png"}], - "version":"0.01", - "description": "A rolex like watch face", - "tags": "clock", - "type": "clock", - "supports":["BANGLEJS2"], - "readme": "README.md", - "allow_emulator": true, - "storage": [ - {"name":"rolex.app.js","url":"app.js"}, - {"name":"rolex.img","url":"app-icon.js","evaluate":true} - ] - } \ No newline at end of file + "name": "rolex", + "shortName":"rolex", + "icon": "rolex.png", + "screenshots": [{"url":"screenshot.png"}], + "version":"0.02", + "description": "A rolex like watch face", + "tags": "clock", + "type": "clock", + "supports":["BANGLEJS2"], + "readme": "README.md", + "allow_emulator": true, + "storage": [ + {"name":"rolex.app.js","url":"app.js"}, + {"name":"rolex.img","url":"app-icon.js","evaluate":true} + ] +}