summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-28 14:24:00 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-28 14:24:00 (GMT)
commit6d74d4f585d3b9d8706da0c9584a8a87e5133c97 (patch)
tree253303d8a28d02e75a083bc518bc9ce92ed65c03
parent77b693414e3882e8addba0635e69621074843890 (diff)
apps: calc: Adopt the system theme for accent colors
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
-rw-r--r--wasp/apps/calc.py9
1 files changed, 7 insertions, 2 deletions
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'))