Clear canvas the right way
This commit is contained in:
parent
e650923bc7
commit
89a3974626
@ -41,6 +41,7 @@ class Command_prompt(Label):
|
||||
|
||||
|
||||
def draw(self):
|
||||
self.canvas.before.clear()
|
||||
|
||||
# background
|
||||
with self.canvas.before:
|
||||
|
3
cross.py
3
cross.py
@ -226,12 +226,12 @@ class Cross_painter(Widget):
|
||||
def reset(self):
|
||||
self.crosses=[]
|
||||
self.selected=None
|
||||
self.canvas.clear()
|
||||
self.draw()
|
||||
|
||||
|
||||
# draw all crosses
|
||||
def draw(self):
|
||||
self.canvas.clear()
|
||||
with self.canvas:
|
||||
for cross in self.crosses:
|
||||
cross.draw()
|
||||
@ -270,7 +270,6 @@ class Cross_painter(Widget):
|
||||
if touch.button=="left" and self.selected!=None:
|
||||
self.selected.pos=self.check_move(Point(touch.x/Cross.size,touch.y/Cross.size),self.selected)
|
||||
# redraw
|
||||
self.canvas.clear()
|
||||
self.draw()
|
||||
|
||||
|
||||
|
@ -39,6 +39,5 @@ class Status_bar(Label):
|
||||
if self.app.readonly:
|
||||
self.raw_text+=" [RO]"
|
||||
|
||||
|
||||
# do not wrap
|
||||
self.text=self.raw_text[:min(len(self.raw_text),int(self.width/self.char_width))]
|
||||
|
Loading…
Reference in New Issue
Block a user