Now About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src/message.py
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2025-01-21 12:33:59 +0000
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2025-01-21 12:33:59 +0000
commitf3201c850ed6fa967074e0a07d9d017540ae69f4 (patch)
treea30092bafb304c071a117f12f6e2e51ffc395772 /src/message.py
parent794e9692fc47b7c801183a12f1910d703cc9dfcb (diff)
message: Grey out system messages
Diffstat (limited to 'src/message.py')
-rw-r--r--src/message.py7
1 files changed, 5 insertions, 2 deletions
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)