From 7bd6dd37c20a0206768c5f950d181f3fce7bc0f0 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 31 Aug 2015 15:44:10 +0200 Subject: Add a COLOR_TIME_STRING theming option --- src/theming.py | 1 + src/windows/text_win.py | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/theming.py b/src/theming.py index b88009a3..5d263741 100755 --- a/src/theming.py +++ b/src/theming.py @@ -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) diff --git a/src/windows/text_win.py b/src/windows/text_win.py index 59c5230b..970bd1f8 100644 --- a/src/windows/text_win.py +++ b/src/windows/text_win.py @@ -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): -- cgit v1.2.3