summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-02-17 17:45:22 +0100
committerAnton Khirnov <anton@khirnov.net>2020-02-19 16:00:44 +0100
commitfbdc7dce60987dc0833a0db031f6dca4f1e1fddc (patch)
tree7f130937b72919b9d0efef413a14e1326a22c15a /alot/settings
parentf063719d64bd4219cb8e1413f3e5a5812e663872 (diff)
widgets/thread: add theming for quote lines in message body
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/manager.py4
-rw-r--r--alot/settings/theme.py16
2 files changed, 20 insertions, 0 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index d9fa724d..f6da5332 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -311,6 +311,10 @@ class SettingsManager:
colours = int(self._config.get('colourmode'))
return self._theme.get_threadline_theming(thread, colours)
+ def get_quote_theming(self):
+ colours = int(self._config.get('colourmode'))
+ return self._theme.get_quote_theming(colours)
+
def get_tagstring_representation(self, tag, onebelow_normal=None,
onebelow_focus=None):
"""
diff --git a/alot/settings/theme.py b/alot/settings/theme.py
index 2794be2c..df34cba9 100644
--- a/alot/settings/theme.py
+++ b/alot/settings/theme.py
@@ -128,3 +128,19 @@ class Theme:
res[part]['normal'] = pickcolour(fill('normal'))
res[part]['focus'] = pickcolour(fill('focus'))
return res
+
+ def get_quote_theming(self, colourmode):
+ """
+ Get a list of attributes to use for displaying successive levels of
+ nested quotes in a message body.
+
+ :param colourmode: colourmode to use, one of 1,16,256.
+ :type colourmode: int
+ """
+ idx = self._colours.index(colourmode)
+ mainsect = self._config['thread']['quote']
+
+ ret = []
+ for sect in sorted(mainsect.sections):
+ ret.append(mainsect[sect]['body'][idx])
+ return ret