filename in status bar
This commit is contained in:
parent
b9fddf4d2d
commit
f164916bd4
2
cross.py
2
cross.py
@ -265,8 +265,6 @@ class Cross_painter(Widget):
|
|||||||
# redraw
|
# redraw
|
||||||
self.canvas.clear()
|
self.canvas.clear()
|
||||||
self.draw()
|
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
|
# find the cross at position pos
|
||||||
|
@ -20,8 +20,6 @@ class Status_bar(Label):
|
|||||||
# init Label
|
# init Label
|
||||||
super(Status_bar,self).__init__(**kwargs)
|
super(Status_bar,self).__init__(**kwargs)
|
||||||
|
|
||||||
def set_text(self,string):
|
|
||||||
self.raw_text=string
|
|
||||||
self.draw()
|
self.draw()
|
||||||
|
|
||||||
def draw(self):
|
def draw(self):
|
||||||
@ -31,5 +29,9 @@ class Status_bar(Label):
|
|||||||
self.message=""
|
self.message=""
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if self.app.openfile!="":
|
||||||
|
self.raw_text=self.app.openfile
|
||||||
|
else:
|
||||||
|
self.raw_text="[no file]"
|
||||||
# do not wrap
|
# do not wrap
|
||||||
self.text=self.raw_text[:min(len(self.raw_text),int(self.width/self.char_width))]
|
self.text=self.raw_text[:min(len(self.raw_text),int(self.width/self.char_width))]
|
||||||
|
Loading…
Reference in New Issue
Block a user