add some experimental colors to status line
This commit is contained in:
parent
73d846ab0d
commit
16f205178f
17
Window.py
17
Window.py
@ -396,22 +396,25 @@ class Window:
|
|||||||
hours = td.seconds / 60 / 60
|
hours = td.seconds / 60 / 60
|
||||||
mins = (td.seconds - hours * 60 * 60) / 60
|
mins = (td.seconds - hours * 60 * 60) / 60
|
||||||
secs = (td.seconds - hours * 60 * 60 - mins * 60)
|
secs = (td.seconds - hours * 60 * 60 - mins * 60)
|
||||||
markfmt = str(int(self.mark.strftime("%I"))) + \
|
markfmt = '<span color="#0000FF">' + \
|
||||||
self.mark.strftime(":%M") + self.mark.strftime("%p")[0].lower()
|
str(int(self.mark.strftime("%I"))) + \
|
||||||
|
self.mark.strftime(":%M") + \
|
||||||
|
self.mark.strftime("%p")[0].lower() + '</span>'
|
||||||
if now.date() != self.mark.date():
|
if now.date() != self.mark.date():
|
||||||
markfmt = self.mark.strftime("%m/%d ") + markfmt
|
markfmt = '<span color="#FF0000">' + \
|
||||||
elapsedfmt = ''
|
self.mark.strftime("%m/%d ") + '</span>' + markfmt
|
||||||
|
elapsedfmt = '<span color="#00CC00">'
|
||||||
if days != 0:
|
if days != 0:
|
||||||
elapsedfmt += '%dd ' % days
|
elapsedfmt += '%dd ' % days
|
||||||
if hours != 0:
|
if hours != 0:
|
||||||
elapsedfmt += '%dh ' % hours
|
elapsedfmt += '%dh ' % hours
|
||||||
if mins != 0:
|
if mins != 0:
|
||||||
elapsedfmt += '%dm ' % mins
|
elapsedfmt += '%dm ' % mins
|
||||||
elapsedfmt += '%ds' % secs
|
elapsedfmt += '%ds</span>' % secs
|
||||||
self.status_label.set_text('Mark: %s Elapsed: %s' % \
|
self.status_label.set_markup('Mark: %s Elapsed: %s' % \
|
||||||
(markfmt, elapsedfmt))
|
(markfmt, elapsedfmt))
|
||||||
else:
|
else:
|
||||||
self.status_label.set_text('No mark set')
|
self.status_label.set_markup('No mark set')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def in_event(self, widget, data=None):
|
def in_event(self, widget, data=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user