From f3201c850ed6fa967074e0a07d9d017540ae69f4 Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Tue, 21 Jan 2025 12:33:59 +0000 Subject: message: Grey out system messages --- src/message.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/message.py') diff --git a/src/message.py b/src/message.py index db50829..0be93c2 100644 --- a/src/message.py +++ b/src/message.py @@ -65,7 +65,7 @@ class WeegtkMessage(Gtk.Box): else: self.avatar.set_text(data["username"]) - if data["type"] == "message_append": + if data["type"] in ["message_append", "system_append"]: self.avatar.set_visible(False) self.username.set_visible(False) @@ -80,7 +80,10 @@ class WeegtkMessage(Gtk.Box): msg = Gtk.Label(label=markuped, selectable=True, wrap=True, wrap_mode=Pango.WrapMode.WORD_CHAR, xalign=0, margin_top=margin, use_markup=True, - margin_start= padding_size if data["type"] == "message_append" else 0) + margin_start= padding_size if data["type"] in ["message_append", "system_append"] else 0) + + if data["type"] in ["system", "system_append"]: + msg.add_css_class("system-message") self.message_list.append(msg) -- cgit