From 138543d4b3a9c1543bf54b55149d648edb8c4bf2 Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Tue, 8 Oct 2024 18:10:39 +0100 Subject: Update requested width+height to be more friendly with mobile linux Also fix rendering error with messages at low window widths. Co-authored-by: Peter --- src/gtk/chat.ui | 1 + src/gtk/message.ui | 32 ++++++-------------------------- src/message.py | 6 +++--- src/window.ui | 4 ++-- 4 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/gtk/chat.ui b/src/gtk/chat.ui index 65765e5..fa4d77d 100644 --- a/src/gtk/chat.ui +++ b/src/gtk/chat.ui @@ -124,3 +124,4 @@ + diff --git a/src/gtk/message.ui b/src/gtk/message.ui index dca0237..9619342 100644 --- a/src/gtk/message.ui +++ b/src/gtk/message.ui @@ -3,10 +3,6 @@ + diff --git a/src/message.py b/src/message.py index 5f70b9e..e61957d 100644 --- a/src/message.py +++ b/src/message.py @@ -16,7 +16,7 @@ # along with this program. If not, see . # # SPDX-License-Identifier: GPL-3.0-or-later -from gi.repository import Adw, Gtk, GLib +from gi.repository import Adw, Gtk, GLib, Pango import re @@ -71,8 +71,8 @@ class WeegtkMessage(Gtk.Box): first = False markuped = self.parse_message(message) msg = Gtk.Label(label=markuped, selectable=True, - wrap=True, halign=0, hexpand=True, hexpand_set=True, - xalign=0, margin_top=margin, use_markup=True) + wrap=True, wrap_mode=Pango.WrapMode.WORD_CHAR, xalign=0, + margin_top=margin, use_markup=True) self.message_list.append(msg) diff --git a/src/window.ui b/src/window.ui index 8aca68c..58f26b4 100644 --- a/src/window.ui +++ b/src/window.ui @@ -24,8 +24,8 @@ Weegtk 800 576 - 400 - 500 + 360 + 294 max-width: 560 -- cgit