filename in status bar

This commit is contained in:
Ian Jauslin 2021-10-16 19:14:22 -04:00
parent b9fddf4d2d
commit f164916bd4
2 changed files with 4 additions and 4 deletions

View File

@ -265,8 +265,6 @@ class Cross_painter(Widget):
# redraw
self.canvas.clear()
self.draw()
# report position in status bar
self.app.status_bar.set_text(" {:05.2f} , {:05.2f}".format(self.selected.pos.x,self.selected.pos.y))
# find the cross at position pos

View File

@ -20,8 +20,6 @@ class Status_bar(Label):
# init Label
super(Status_bar,self).__init__(**kwargs)
def set_text(self,string):
self.raw_text=string
self.draw()
def draw(self):
@ -31,5 +29,9 @@ class Status_bar(Label):
self.message=""
return
if self.app.openfile!="":
self.raw_text=self.app.openfile
else:
self.raw_text="[no file]"
# do not wrap
self.text=self.raw_text[:min(len(self.raw_text),int(self.width/self.char_width))]