From f9bba3d17d4ac8c12e01adccc06566a46546e995 Mon Sep 17 00:00:00 2001 From: Chris Vittal Date: Tue, 27 Oct 2020 14:56:44 -0400 Subject: Apply relevant msglist styles in order Allow styles to be layered over a base style. The list of styles to apply is layered over the base style in order, such that if the layer does not differ from the base it is not used. The order that these styles are applied in is, from first to last: msglist_default msglist_unread msglist_read (exclusive with unread, so technically the same level) msglist_flagged msglist_deleted msglist_marked So, msglist_marked style dominates. This fixes an issue where the msglist_deleted style was not being applied. --- doc/aerc-stylesets.7.scd | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'doc/aerc-stylesets.7.scd') diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd index e3e7b1f2..818bf698 100644 --- a/doc/aerc-stylesets.7.scd +++ b/doc/aerc-stylesets.7.scd @@ -107,12 +107,12 @@ styling. : Unread messages in a message list. | msglist_read : Read messages in a message list. +| msglist_flagged +: The messages with the flagged flag. | msglist_deleted : The messages marked as deleted. | msglist_marked : The messages with the marked flag. -| msglist_flagged -: The messages with the flagged flag. | dirlist_default : The default style for directories in the directory list. | completion_default @@ -175,6 +175,23 @@ If we specify the global style selected modifer using fnmatch as below: This toggles the reverse switch for selected version of all the style objects. +## Layered styles +Some styles, (currently only the `msglist\*` ones) are applied in layers. If +a style differs from the base (in this case `msglist_default`) then that style +applies, unless overridden by a higher layer. The order that `msglist` styles +are applied in is, from first to last: + +``` +msglist_default +msglist_unread +msglist_read +msglist_flagged +msglist_deleted +msglist_marked +``` + +So, the marked style will override all other msglist styles. + ## Colors The color values are set using the values accepted by the tcell library. The values can be one of the following. -- cgit