From 6d74d4f585d3b9d8706da0c9584a8a87e5133c97 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Mon, 28 Dec 2020 14:24:00 +0000 Subject: apps: calc: Adopt the system theme for accent colors Signed-off-by: Daniel Thompson diff --git a/wasp/apps/calc.py b/wasp/apps/calc.py index a7293d9..d7b4576 100644 --- a/wasp/apps/calc.py +++ b/wasp/apps/calc.py @@ -81,20 +81,25 @@ class CalculatorApp(): draw = wasp.watch.drawable draw.fill() # Make grid: + draw.set_color(wasp.system.theme('accent-lo')) for i in range(4): # horizontal lines draw.line(x0=0,y0=(i+1)*47,x1=240,y1=(i+1)*47) # vertical lines draw.line(x0=(i+1)*47,y0=47,x1=(i+1)*47,y1=240) # Draw button label: - for y in range(4): - for x in range(5): + draw.set_color(wasp.system.theme('accent-hi')) + for x in range(5): + if x == 3: + draw.set_color(wasp.system.theme('accent-mid')) + for y in range(4): label = self.fields[y][x] if (x == 0): draw.string(label, x*47+14, y*47+60) else: draw.string(label, x*47+16, y*47+60) draw.string("<", 215, 10) + draw.set_color(wasp.system.theme('accent-hi')) -- cgit v0.10.2