From 6edac864096155230af233cfa65e1366703bd2e3 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 7 Jul 2011 14:54:53 -0400 Subject: [PATCH] add "fgcolor" conf param --- Window.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Window.py b/Window.py index f6f2aa5..5082479 100755 --- a/Window.py +++ b/Window.py @@ -17,6 +17,8 @@ class Window(object): self.conf['mailbox'] = 'Inbox' if not 'updaterate' in self.conf: self.conf['updaterate'] = 5000 + if not 'fgcolor' in self.conf: + self.conf['fgcolor'] = (0.0, 0.0, 0.0) if not 'bgcolor' in self.conf: self.conf['bgcolor'] = (1.0, 0.5, 0.0) if not 'font_size' in self.conf: @@ -89,9 +91,13 @@ class Window(object): if self.connection is None: self.label.set_text('-') else: + fgcolor = ''.join(map(lambda x: '%02x' % int(0xFF * x), + self.conf['fgcolor'])) + sz = 1024 * self.conf['font_size'] self.label.set_markup( - ('%d' - % (1024 * self.conf['font_size'], self.count))) + ('%d' + % (fgcolor, sz, self.count))) def destroy_event(self): self.disconnect()