diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-07-21 16:44:44 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-07-21 16:44:44 +0100 |
commit | 45db4b1ae2c3f95164db644fb1732569df798a52 (patch) | |
tree | 62619d1972ad2f13cf635b9b7905d83616f70065 | |
parent | 91156fe76ea1048c0d3167008f2cbf6e19d4fcfc (diff) |
make left align default, fix date padding
-rw-r--r-- | alot/defaults/default.theme | 1 | ||||
-rw-r--r-- | alot/defaults/theme.spec | 2 | ||||
-rw-r--r-- | alot/widgets.py | 6 |
3 files changed, 2 insertions, 7 deletions
diff --git a/alot/defaults/default.theme b/alot/defaults/default.theme index 62ed4433..e88f4a97 100644 --- a/alot/defaults/default.theme +++ b/alot/defaults/default.theme @@ -47,6 +47,7 @@ normal = 'default','','light gray','default','g74','default' focus = 'standout','','yellow','light gray','yellow','g58' width = 'fit',10,10 + alignment = right [[[mailcount]]] normal = 'default','','light gray','default','g66','default' focus = 'standout','','yellow','light gray','yellow','g58' diff --git a/alot/defaults/theme.spec b/alot/defaults/theme.spec index 176d7b8a..05d59c16 100644 --- a/alot/defaults/theme.spec +++ b/alot/defaults/theme.spec @@ -33,7 +33,7 @@ normal = attrtriple focus = attrtriple width = widthtuple(default=None) - alignment = align(default='right') + alignment = align(default='left') [[__many__]] normal = attrtriple(default=None) focus = attrtriple(default=None) diff --git a/alot/widgets.py b/alot/widgets.py index c09bda0d..16d4b53b 100644 --- a/alot/widgets.py +++ b/alot/widgets.py @@ -10,7 +10,6 @@ from alot.helper import tag_cmp from alot.helper import string_decode import alot.db.message as message from alot.db.attachment import Attachment -import time from alot.db.utils import decode_header @@ -74,10 +73,6 @@ class ThreadlineWidget(urwid.AttrMap): selectable line widget that represents a :class:`~alot.db.Thread` in the :class:`~alot.buffers.SearchBuffer`. """ - # The pretty_datetime needs 9 characters, but only 8 if locale - # doesn't use am/pm (in which case "jan 2012" is the longest) - pretty_datetime_len = 8 if len(time.strftime("%P")) == 0 else 9 - def __init__(self, tid, dbman): self.dbman = dbman self.thread = dbman.get_thread(tid) @@ -115,7 +110,6 @@ class ThreadlineWidget(urwid.AttrMap): if self.thread: newest = self.thread.get_newest_date() datestring = settings.represent_datetime(newest) - datestring = datestring.rjust(self.pretty_datetime_len) datestring = pad(datestring) width = len(datestring) part = AttrFlipWidget(urwid.Text(datestring), struct['date']) |