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 <daniel@redfelineninja.org.uk>
This commit is contained in:
Daniel Thompson 2020-06-12 08:53:32 +01:00
parent bd41368d2b
commit 823e85584d
2 changed files with 9 additions and 4 deletions

View file

@ -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)

View file

@ -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)