From 823e85584d3363f6a6a775c3ff6eca55e6c7e00d Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Fri, 12 Jun 2020 08:53:32 +0100 Subject: [PATCH] apps: [steps,stopwatch]: Increase font size of clock We also change the colour scheme slightly because the increased size of the clock interferes visually with the main display when it is bright white. Signed-off-by: Daniel Thompson --- wasp/apps/steps.py | 6 ++++-- wasp/apps/stopwatch.py | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wasp/apps/steps.py b/wasp/apps/steps.py index f2b0382..8dbf619 100644 --- a/wasp/apps/steps.py +++ b/wasp/apps/steps.py @@ -69,8 +69,9 @@ class StepCounterApp(): now = wasp.watch.rtc.get_localtime() if now[4] != self._last_clock[4]: t1 = '{:02}:{:02}'.format(now[3], now[4]) - draw.set_font(fonts.sans24) - draw.string(t1, 48, 16, 240-96) + draw.set_font(fonts.sans28) + draw.set_color(0x7bef) + draw.string(t1, 48, 12, 240-96) if now[2] != self._last_clock[2]: watch.accel.steps = 0 @@ -83,4 +84,5 @@ class StepCounterApp(): t = str(count) w = fonts.width(fonts.sans36, t) draw.set_font(fonts.sans36) + draw.set_color(0xfff0) draw.string(t, 228-w, 132-18) diff --git a/wasp/apps/stopwatch.py b/wasp/apps/stopwatch.py index f953e6f..2b7e7e8 100644 --- a/wasp/apps/stopwatch.py +++ b/wasp/apps/stopwatch.py @@ -82,6 +82,7 @@ class StopwatchApp(): t = '' draw.set_font(fonts.sans24) + draw.set_color(0xfff0) w = fonts.width(fonts.sans24, t) draw.string(t, 0, y + (i*24), 240) @@ -111,8 +112,9 @@ class StopwatchApp(): now = wasp.watch.rtc.get_localtime() if now[4] != self._last_clock[4]: t1 = '{:02}:{:02}'.format(now[3], now[4]) - draw.set_font(fonts.sans24) - draw.string(t1, 48, 16, 240-96) + draw.set_font(fonts.sans28) + draw.set_color(0x7bef) + draw.string(t1, 48, 12, 240-96) self._last_clock = now self._meter.update() @@ -127,6 +129,7 @@ class StopwatchApp(): t2 = '{:02}'.format(centisecs) draw.set_font(fonts.sans36) + draw.set_color(0xffff) w = fonts.width(fonts.sans36, t1) draw.string(t1, 180-w, 120-36) draw.fill(0, 0, 120-36, 180-w, 36)