From ba20a7b51eecc1452c7e5fb62b4964b5d7d875ad Mon Sep 17 00:00:00 2001 From: Marco Heiming Date: Thu, 6 Jan 2022 15:37:33 +0100 Subject: [PATCH] Center clock text & better placement for date texts --- apps/circlesclock/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js index ac7ae1b3f..b5ee61c75 100644 --- a/apps/circlesclock/app.js +++ b/apps/circlesclock/app.js @@ -79,15 +79,15 @@ function draw() { // time g.setFont("Vector:50"); - g.setFontAlign(-1, -1); + g.setFontAlign(0, -1); g.setColor(colorFg); - g.drawString(locale.time(new Date(), 1), w / 10, h1 + 8); + g.drawString(locale.time(new Date(), 1), w / 2, h1 + 8); // date & dow g.setFont("Vector:21"); g.setFontAlign(-1, 0); - g.drawString(locale.date(new Date()), w / 10, h2); - g.drawString(locale.dow(new Date()), w / 10, h2 + 22); + g.drawString(locale.date(new Date()), w > 180 ? 2 * w / 10 : w / 10, h2); + g.drawString(locale.dow(new Date()), w > 180 ? 2 * w / 10 : w / 10, h2 + 22); drawCircle(1, "steps"); drawCircle(2, "hr");