From 6c61c17d2b614c56cc20692484a498fc73b24a30 Mon Sep 17 00:00:00 2001 From: Amos Blanton Date: Sat, 11 Dec 2021 11:14:45 +0100 Subject: [PATCH] Copy offset and font size changes from wclock to handle Bangle.js 2 --- apps/impwclock/clock-impword.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/impwclock/clock-impword.js b/apps/impwclock/clock-impword.js index 5492eac15..c9a7bfae3 100644 --- a/apps/impwclock/clock-impword.js +++ b/apps/impwclock/clock-impword.js @@ -34,14 +34,16 @@ const timeOfDay = { }; -// offsets and increments -const xs = 35; -const ys = 31; -const dy = 22; -const dx = 25; +var big = g.getWidth()>200; +// offsets and incerments +const xs = big ? 35 : 20; +const ys = big ? 31 : 28; +const dx = big ? 25 : 20; +const dy = big ? 22 : 16; + // font size and color -const fontSize = 3; // "6x8" +const fontSize = big ? 3 : 2; // "6x8" const passivColor = 0x3186 /*grey*/ ; const activeColorNight = 0xF800 /*red*/ ; const activeColorDay = 0xFFFF /* white */;