TypeTray: Add lids matching top_edge

This commit is contained in:
Florian Festi 2019-01-10 22:27:36 +01:00
parent 371097aa89
commit 5c70515f01
1 changed files with 8 additions and 10 deletions

View File

@ -106,16 +106,6 @@ class TypeTray(_TopEdge):
if b != "e":
self.rectangularWall(x, y, "ffff", callback=[
self.xSlots, self.ySlots], move="up")
if self.closedtop:
if self.top_edge == "f":
e = "FFFF"
else:
e = "ffff"
if sameh:
self.rectangularWall(x, y, e, callback=[
self.xSlots, self.ySlots], move="up")
else:
self.rectangularWall(x, y, e, move="up")
# Inner walls
@ -130,6 +120,14 @@ class TypeTray(_TopEdge):
self.rectangularWall(x, hi, e, move="up")
# top / lid
if self.closedtop and sameh:
e = "FFFF" if self.top_edge == "f" else "ffff"
self.rectangularWall(x, y, e, callback=[
self.xSlots, self.ySlots], move="up")
else:
self.drawLid(x, y, self.top_edge)
self.ctx.restore()
self.rectangularWall(x, hi, "ffff", move="right only")