diff --git a/wasp/apps/clock.py b/wasp/apps/clock.py index c062d3e..2d5e30e 100644 --- a/wasp/apps/clock.py +++ b/wasp/apps/clock.py @@ -70,14 +70,16 @@ class ClockApp(): True then a full redraw is be performed. """ draw = wasp.watch.drawable + hi = wasp.system.theme('accent-hi') + mid = wasp.system.theme('accent-mid') + lo = wasp.system.theme('accent-lo') if redraw: now = wasp.watch.rtc.get_localtime() # Clear the display and draw that static parts of the watch face draw.fill() - draw.rleblit(digits.clock_colon, pos=(2*48, 80), - fg=wasp.system.theme('accent-mid')) + draw.rleblit(digits.clock_colon, pos=(2*48, 80), fg=mid) # Redraw the status bar wasp.system.bar.draw() @@ -96,14 +98,11 @@ class ClockApp(): month = MONTH[month*3:(month+1)*3] # Draw the changeable parts of the watch face - draw.rleblit(DIGITS[now[4] % 10], pos=(4*48, 80), - fg=wasp.system.theme('accent-hi')) - draw.rleblit(DIGITS[now[4] // 10], pos=(3*48, 80), - fg=wasp.system.theme('accent-lo')) - draw.rleblit(DIGITS[now[3] % 10], pos=(1*48, 80), - fg=wasp.system.theme('accent-hi')) - draw.rleblit(DIGITS[now[3] // 10], pos=(0*48, 80), - fg=wasp.system.theme('accent-lo')) + draw.rleblit(DIGITS[now[4] % 10], pos=(4*48, 80), fg=hi) + draw.rleblit(DIGITS[now[4] // 10], pos=(3*48, 80), fg=lo) + draw.rleblit(DIGITS[now[3] % 10], pos=(1*48, 80), fg=hi) + draw.rleblit(DIGITS[now[3] // 10], pos=(0*48, 80), fg=lo) + draw.set_color(hi) draw.string('{} {} {}'.format(now[2], month, now[0]), 0, 180, width=240)