Add a COLOR_TIME_STRING theming option

This commit is contained in:
Florent Le Coz 2015-08-31 15:44:10 +02:00
parent 2697159c89
commit 7bd6dd37c2
2 changed files with 5 additions and 0 deletions

View file

@ -201,6 +201,7 @@ class Theme(object):
# Time
CHAR_TIME_LEFT = ''
CHAR_TIME_RIGHT = ''
COLOR_TIME_STRING = (-1, -1)
# Tabs
COLOR_TAB_NORMAL = (7, 4)

View file

@ -102,7 +102,11 @@ class BaseTextWin(Win):
Write the date on the yth line of the window
"""
if time:
color = get_theme().COLOR_TIME_STRING
curses_color = to_curses_attr(color)
self._win.attron(curses_color)
self.addstr(time)
self._win.attroff(curses_color)
self.addstr(' ')
def resize(self, height, width, y, x, room=None):