summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/widgets/thread.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py
index 2af22b07..35024d34 100644
--- a/alot/widgets/thread.py
+++ b/alot/widgets/thread.py
@@ -562,11 +562,8 @@ class ThreadNode(urwid.WidgetWrap):
_have_next_sibling = None
def __init__(self, msg, thread, pos, indent):
- if pos & 1:
- attr = settings.get_theming_attribute('thread', 'summary', 'odd')
- else:
- attr = settings.get_theming_attribute('thread', 'summary', 'even')
-
+ parity = 'odd' if pos & 1 else 'even'
+ attr = settings.get_theming_attribute('thread', 'summary', parity)
attr_focus = settings.get_theming_attribute('thread', 'summary', 'focus')
msg_summary = MessageSummaryWidget(msg, attr, attr_focus)