Philipp Hörist pushed to branch master at gajim / gajim
Commits:
332ada30 by Philipp Hörist at 2024-09-22T11:28:00+02:00
fix: Groupchat: Wrap long nicknames in subject row
- - - - -
1 changed file:
- gajim/gtk/conversation/rows/muc_subject.py
Changes:
=====================================
gajim/gtk/conversation/rows/muc_subject.py
=====================================
@@ -8,6 +8,7 @@
from datetime import datetime
from gi.repository import Gtk
+from gi.repository import Pango
from nbxmpp.structs import MucSubject
from gajim.common.const import AvatarSize
@@ -55,12 +56,17 @@ def __init__(self,
date = ''
if subject.timestamp is not None:
time_str = time.strftime('%c', time.localtime(subject.timestamp))
- date = f' ({time_str})'
-
- meta_str = f'{author}{date}'
- meta = Gtk.Label(label=meta_str)
- meta.set_halign(Gtk.Align.START)
- meta.set_selectable(True)
+ date = f'{time_str}\n'
+
+ meta_str = f'{author}\n{date}'
+ meta = Gtk.Label(
+ halign=Gtk.Align.START,
+ label=meta_str,
+ selectable=True,
+ wrap=True,
+ wrap_mode=Pango.WrapMode.WORD_CHAR,
+ xalign=0,
+ )
meta.get_style_context().add_class('small-label')
subject_box.add(meta)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/332ada305defc7c863bd4773c6f59be1730f63ee
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/332ada305defc7c863bd4773c6f59be1730f63ee
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]