aboutsummaryrefslogtreecommitdiffstats
path: root/config/style.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-09-11 17:34:51 +0200
committerRobin Jarry <robin@jarry.cc>2023-09-19 16:49:59 +0200
commitde0b75d191f4f789d3870dae00871244d20aaf10 (patch)
tree8604ebfd38f0903df7a951471743cfd07dccd21d /config/style.go
parent20e425406541e3fc7c4decad3da9373d378c7164 (diff)
downloadaerc-de0b75d191f4f789d3870dae00871244d20aaf10.tar.gz
msgviewer: add styles for part selector
Allow styling the part selector mime type and (if any) attachment filename. Remove custom alignment code since now both can be differentiated easily with colors and/or attributes. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'config/style.go')
-rw-r--r--config/style.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/config/style.go b/config/style.go
index f50126bd..3f117fc0 100644
--- a/config/style.go
+++ b/config/style.go
@@ -46,6 +46,10 @@ const (
STYLE_DIRLIST_UNREAD
STYLE_DIRLIST_RECENT
+ STYLE_PART_SWITCHER
+ STYLE_PART_FILENAME
+ STYLE_PART_MIMETYPE
+
STYLE_COMPLETION_DEFAULT
STYLE_COMPLETION_GUTTER
STYLE_COMPLETION_PILL
@@ -91,6 +95,10 @@ var StyleNames = map[string]StyleObject{
"dirlist_unread": STYLE_DIRLIST_UNREAD,
"dirlist_recent": STYLE_DIRLIST_RECENT,
+ "part_switcher": STYLE_PART_SWITCHER,
+ "part_filename": STYLE_PART_FILENAME,
+ "part_mimetype": STYLE_PART_MIMETYPE,
+
"completion_default": STYLE_COMPLETION_DEFAULT,
"completion_gutter": STYLE_COMPLETION_GUTTER,
"completion_pill": STYLE_COMPLETION_PILL,
@@ -330,6 +338,9 @@ func NewStyleSet() StyleSet {
case STYLE_MSGLIST_PILL:
// msglist_pill.reverse=true
conf.base.Reverse = true
+ case STYLE_PART_MIMETYPE:
+ // part_mimetype.dim=true
+ conf.base.Dim = true
case STYLE_COMPLETION_PILL:
// completion_pill.reverse=true
conf.base.Reverse = true
@@ -351,6 +362,14 @@ func NewStyleSet() StyleSet {
selected := *conf
// *.selected.reverse=toggle
selected.base.Reverse = !conf.base.Reverse
+ switch so {
+ case STYLE_PART_MIMETYPE:
+ // part_mimetype.selected.dim=false
+ selected.base.Dim = false
+ case STYLE_PART_FILENAME:
+ // part_filename.selected.bold=true
+ selected.base.Bold = true
+ }
ss.selected[so] = &selected
}
return ss