apps: calc: Adopt the system theme for accent colors
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
parent
77b693414e
commit
6d74d4f585
1 changed files with 7 additions and 2 deletions
|
@ -81,20 +81,25 @@ class CalculatorApp():
|
||||||
draw = wasp.watch.drawable
|
draw = wasp.watch.drawable
|
||||||
draw.fill()
|
draw.fill()
|
||||||
# Make grid:
|
# Make grid:
|
||||||
|
draw.set_color(wasp.system.theme('accent-lo'))
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
# horizontal lines
|
# horizontal lines
|
||||||
draw.line(x0=0,y0=(i+1)*47,x1=240,y1=(i+1)*47)
|
draw.line(x0=0,y0=(i+1)*47,x1=240,y1=(i+1)*47)
|
||||||
# vertical lines
|
# vertical lines
|
||||||
draw.line(x0=(i+1)*47,y0=47,x1=(i+1)*47,y1=240)
|
draw.line(x0=(i+1)*47,y0=47,x1=(i+1)*47,y1=240)
|
||||||
# Draw button label:
|
# Draw button label:
|
||||||
for y in range(4):
|
draw.set_color(wasp.system.theme('accent-hi'))
|
||||||
for x in range(5):
|
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]
|
label = self.fields[y][x]
|
||||||
if (x == 0):
|
if (x == 0):
|
||||||
draw.string(label, x*47+14, y*47+60)
|
draw.string(label, x*47+14, y*47+60)
|
||||||
else:
|
else:
|
||||||
draw.string(label, x*47+16, y*47+60)
|
draw.string(label, x*47+16, y*47+60)
|
||||||
draw.string("<", 215, 10)
|
draw.string("<", 215, 10)
|
||||||
|
draw.set_color(wasp.system.theme('accent-hi'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue