[fractal/fractal-next] room-history: Change wrap mode for labels to PANGO_WRAP_WORDCHAR



commit a0bf9064bcc0ec2cda9c66d6524bdc2e2d59c631
Author: Julian Sparber <julian sparber net>
Date:   Wed Sep 8 12:07:05 2021 +0200

    room-history: Change wrap mode for labels to PANGO_WRAP_WORDCHAR
    
    Fixes: https://gitlab.gnome.org/GNOME/fractal/-/issues/826

 src/session/content/message_row.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/session/content/message_row.rs b/src/session/content/message_row.rs
index dfc8d362..4e6a70fe 100644
--- a/src/session/content/message_row.rs
+++ b/src/session/content/message_row.rs
@@ -2,7 +2,7 @@ use crate::components::Avatar;
 use adw::{prelude::*, subclass::prelude::*};
 use gettextrs::gettext;
 use gtk::{
-    gio, glib, glib::clone, glib::signal::SignalHandlerId, prelude::*, subclass::prelude::*,
+    gio, glib, glib::clone, glib::signal::SignalHandlerId, pango, prelude::*, subclass::prelude::*,
     CompositeTemplate,
 };
 use html2pango::{
@@ -360,6 +360,7 @@ fn create_widget_for_html_message(blocks: Vec<HtmlBlock>) -> gtk::Widget {
 
 fn set_label_styles(w: &gtk::Label) {
     w.set_wrap(true);
+    w.set_wrap_mode(pango::WrapMode::WordChar);
     w.set_justify(gtk::Justification::Left);
     w.set_xalign(0.0);
     w.set_valign(gtk::Align::Start);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]