From a476be978698d84930eafb443af422834de41538 Mon Sep 17 00:00:00 2001 From: David Peer Date: Sat, 19 Feb 2022 09:36:32 +0100 Subject: [PATCH] Minor changes --- apps/neonx/README.md | 4 +--- apps/neonx/neonx.app.js | 10 +++------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/neonx/README.md b/apps/neonx/README.md index c3eb982c6..ffb3c3f2c 100644 --- a/apps/neonx/README.md +++ b/apps/neonx/README.md @@ -24,6 +24,4 @@ Shows the watchface in fullscreen mode. Note: In fullscreen mode, widgets are hidden, but still loaded. ### Show lock status -In fullscreen mode it can be useful to detect, whether the BangleJs is locked or not. -If these settings are enabled, the first digit is shown red if the BangleJs is locked -and purple otherwise. \ No newline at end of file +If enabled, color changes when unlocked to detect the lock state easily. \ No newline at end of file diff --git a/apps/neonx/neonx.app.js b/apps/neonx/neonx.app.js index 165ec32a6..d64e08d78 100644 --- a/apps/neonx/neonx.app.js +++ b/apps/neonx/neonx.app.js @@ -45,8 +45,6 @@ const colors = { ["#00FF00", "#00FFFF"] ] }; -const unlockColor = "#FF0000"; - const is12hour = (require("Storage").readJSON("setting.json",1)||{})["12hour"]||false; const screenWidth = g.getWidth(); const screenHeight = g.getHeight(); @@ -84,14 +82,12 @@ function drawClock(num){ const current = ((y + 1) * 2 + x - 1); let newScale = scale; - let c = colors[settings.io ? 'io' : 'x'][y][x]; - if(x == 0 && y == 0 && settings.showLock){ - c = Bangle.isLocked() ? c : unlockColor; - } + let xc = settings.showLock && Bangle.isLocked() ? Math.abs(x-1) : x; + let c = colors[settings.io ? 'io' : 'x'][y][xc]; g.setColor(c); if (!settings.io) { - newScale *= settings.fullscreen ? 1.18 : 1.0; + newScale *= settings.fullscreen ? 1.20 : 1.0; let dx = settings.fullscreen ? 0 : 18 tx = (x * 100 + dx) * newScale; ty = (y * 100 + dx*2) * newScale;