summaryrefslogtreecommitdiff
path: root/src/window.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-11 01:50:18 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-11 01:50:18 +0000
commitdc13b82bd4b675d6b6ec401861429f7f4cae18b5 (patch)
treeb62b93f1c6fba5b266a22af4c1bbc7c3a91c7cd7 /src/window.py
parent92d155acf559ec7c3c859767f2256793dd251822 (diff)
downloadpoezio-dc13b82bd4b675d6b6ec401861429f7f4cae18b5.tar.gz
poezio-dc13b82bd4b675d6b6ec401861429f7f4cae18b5.tar.bz2
poezio-dc13b82bd4b675d6b6ec401861429f7f4cae18b5.tar.xz
poezio-dc13b82bd4b675d6b6ec401861429f7f4cae18b5.zip
only have 64 colours, so everything works fine on every terminal, even on tmux. Fixed #1824
Diffstat (limited to 'src/window.py')
-rw-r--r--src/window.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/window.py b/src/window.py
index 9e9a7431..993a43ef 100644
--- a/src/window.py
+++ b/src/window.py
@@ -215,7 +215,8 @@ class TextWin(Win):
txt = message.txt
if not txt:
continue
- offset = 11 # length of the time
+ # length of the time
+ offset = 9+len(theme.CHAR_TIME_LEFT[:1])+len(theme.CHAR_TIME_RIGHT[:1])
if message.nickname and len(message.nickname) >= 30:
nick = message.nickname[:30]+'…'
else:
@@ -351,9 +352,9 @@ class TextWin(Win):
"""
Write the date on the yth line of the window
"""
- self.win.attron(curses.color_pair(theme.COLOR_TIME_BRACKETS))
- self.addnstr('[', 1)
- self.win.attroff(curses.color_pair(theme.COLOR_TIME_BRACKETS))
+ self.win.attron(curses.color_pair(theme.COLOR_TIME_LIMITER))
+ self.addnstr(theme.CHAR_TIME_LEFT, 1)
+ self.win.attroff(curses.color_pair(theme.COLOR_TIME_LIMITER))
self.win.attron(curses.color_pair(theme.COLOR_TIME_NUMBERS))
self.addnstr(time.strftime("%H"), 2)
@@ -375,9 +376,9 @@ class TextWin(Win):
self.addnstr(time.strftime('%S'), 2)
self.win.attroff(curses.color_pair(theme.COLOR_TIME_NUMBERS))
- self.win.attron(curses.color_pair(theme.COLOR_TIME_BRACKETS))
- self.addstr(']')
- self.win.attroff(curses.color_pair(theme.COLOR_TIME_BRACKETS))
+ self.win.attron(curses.color_pair(theme.COLOR_TIME_LIMITER))
+ self.addnstr(theme.CHAR_TIME_RIGHT, 1)
+ self.win.attroff(curses.color_pair(theme.COLOR_TIME_LIMITER))
self.addstr(' ')