Fix own message text color

This commit is contained in:
Sijmen 2023-11-29 02:06:06 +01:00
parent 793422c7da
commit 8f1a3fdb29
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -449,11 +449,10 @@ impl<'a> MessageLog {
}
MessageDetail::Privmsg { nickname, message } => {
let is_self = nickname == current_nickname;
let text_color = if is_self { util::DARK_RED } else { util::BLACK };
let message_appearance = Self::container_appearance(util::WHITE, 8.0);
let own_message_appearance = Self::container_appearance(util::LIGHTER_GREEN, 8.0);
let mut elements: Vec<Element<'_, _, _>> =
vec![text(message).style(text_color).into()];
vec![text(message).style(util::BLACK).into()];
if !is_self {
elements.insert(0, text(nickname).style(util::DARK_RED).into());