Italicize selected room in roster view

This commit is contained in:
FIGBERT 2023-04-26 14:46:38 -07:00
parent 73b0d3f1a2
commit 7e1f8bcc59
No known key found for this signature in database
GPG key ID: 67F1598D607A844B

View file

@ -225,7 +225,8 @@ func (rstr *RosterView) Draw(screen mauview.Screen) {
if isSelected { if isSelected {
style = style. style = style.
Foreground(tcell.ColorBlack). Foreground(tcell.ColorBlack).
Background(tcell.ColorWhite) Background(tcell.ColorWhite).
Italic(true)
} }
timestamp := room.LastReceivedMessage timestamp := room.LastReceivedMessage
@ -243,7 +244,7 @@ func (rstr *RosterView) Draw(screen mauview.Screen) {
lastMessage, received := rstr.getMostRecentMessage(room) lastMessage, received := rstr.getMostRecentMessage(room)
msgStyle := style.Foreground(tcell.ColorGray).Italic(!received) msgStyle := style.Foreground(tcell.ColorGray).Italic(!received)
if isSelected { if isSelected {
msgStyle = msgStyle.Background(tcell.ColorWhite) msgStyle = msgStyle.Background(tcell.ColorWhite).Italic(true)
} }
tmX := rstr.width - 3 - len(tm) tmX := rstr.width - 3 - len(tm)