Commit f91a0138 authored by NikolaPi's avatar NikolaPi
Browse files

Improved Line Wrapping

Currently messages with long words (non-space separated) result in an expanded window size.

This commit changes the line wrapping mode to WORD_CHAR to allow for wrapping mid-word.

#81
parent 45c6c749
Pipeline #5391 passed with stage
in 3 minutes and 53 seconds
......@@ -8,7 +8,7 @@
from datetime import datetime
from gettext import gettext as _
from gi.repository import Gtk
from gi.repository import Gtk, Pango
class PrivateMessageWidget(Gtk.ListBoxRow):
......@@ -119,6 +119,7 @@ class PrivateMessageWidget(Gtk.ListBoxRow):
def _create_body_content(text):
body_content = Gtk.Label.new(text)
body_content.set_line_wrap(True)
body_content.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
body_content.set_halign(Gtk.Align.START)
body_content.set_selectable(True)
body_content.set_xalign(0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment