From c72267491862d5faf9abbbd96e3e526286220ae3 Mon Sep 17 00:00:00 2001 From: alfrix Date: Mon, 13 Feb 2023 21:02:25 -0600 Subject: [PATCH] fix popup word wrap --- screen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/screen.py b/screen.py index e722863b..93b914fd 100755 --- a/screen.py +++ b/screen.py @@ -316,6 +316,7 @@ class KlipperScreen(Gtk.Window): msg.set_vexpand(True) msg.get_child().set_line_wrap(True) msg.get_child().set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) + msg.get_child().set_max_width_chars(40) msg.connect("clicked", self.close_popup_message) msg.get_style_context().add_class("message_popup") if level == 1: @@ -327,7 +328,7 @@ class KlipperScreen(Gtk.Window): popup = Gtk.Popover.new(self.base_panel.titlebar) popup.get_style_context().add_class("message_popup_popover") - popup.set_size_request(self.width, -1) + popup.set_size_request(self.width *.9, -1) popup.set_halign(Gtk.Align.CENTER) popup.add(msg) popup.popup()