feat(config): add message_style and selected_message_style options for messages list (#717)
This commit is contained in:
parent
3c3c33e978
commit
e5a4fb25c2
3 changed files with 8 additions and 1 deletions
|
|
@ -152,6 +152,8 @@ mention_style = { foreground = "blue" }
|
|||
emoji_style = { foreground = "green" }
|
||||
url_style = { foreground = "blue" }
|
||||
attachment_style = { foreground = "yellow" }
|
||||
message_style = {}
|
||||
selected_message_style = { attributes = "reverse" }
|
||||
|
||||
[theme.mentions_list]
|
||||
# Note: width and height are capped to the avaliable space
|
||||
|
|
|
|||
|
|
@ -146,6 +146,9 @@ type (
|
|||
EmojiStyle StyleWrapper `toml:"emoji_style"`
|
||||
URLStyle StyleWrapper `toml:"url_style"`
|
||||
AttachmentStyle StyleWrapper `toml:"attachment_style"`
|
||||
|
||||
MessageStyle StyleWrapper `toml:"message_style"`
|
||||
SelectedMessageStyle StyleWrapper `toml:"selected_message_style"`
|
||||
}
|
||||
|
||||
MentionsListTheme struct {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,9 @@ func (ml *messagesList) buildItem(index int, cursor int) tview.ScrollListItem {
|
|||
SetDynamicColors(true).
|
||||
SetText(ml.renderMessage(message))
|
||||
if index == cursor {
|
||||
tv.SetTextStyle(tcell.StyleDefault.Reverse(true))
|
||||
tv.SetTextStyle(ml.cfg.Theme.MessagesList.SelectedMessageStyle.Style)
|
||||
} else {
|
||||
tv.SetTextStyle(ml.cfg.Theme.MessagesList.MessageStyle.Style)
|
||||
}
|
||||
return tv
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue