[meld/meld-3-20] ui.msgarea: Work around wrapping label allocation issues (#588)



commit ece22483e6b0a75714ca58e89a253574d1bb43aa
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jul 18 12:01:30 2021 +1000

    ui.msgarea: Work around wrapping label allocation issues (#588)
    
    It's unclear what the bug here is, and I haven't been able to narrow it
    down well enough for a GTK bug report. In Meld, this problem manifests
    as the window getting a large fixed minimum allocation - apparently on
    the GtkScrolledWindow child, but I haven't tracked it down - when the
    GtkInfoBar has *two* child labels *both* of which use WORD_CHAR or CHAR
    wrapping.
    
    Since this bug does not show up if either label has WORD wrapping, here
    we're working around the problem by removing the WORD_CHAR wrapping from
    the secondary label. Since this wrapping was added to fix a bug in the
    primary label display on Windows, this seems like our best option.

 meld/ui/msgarea.py | 1 -
 1 file changed, 1 deletion(-)
---
diff --git a/meld/ui/msgarea.py b/meld/ui/msgarea.py
index 5b482c5a..81d2b1f4 100644
--- a/meld/ui/msgarea.py
+++ b/meld/ui/msgarea.py
@@ -45,7 +45,6 @@ def layout_text_and_icon(stockid, primary_text, secondary_text=None):
         secondary_label = Gtk.Label(
             "<small>{}</small>".format(secondary_text),
             wrap=True,
-            wrap_mode=Pango.WrapMode.WORD_CHAR,
             use_markup=True,
             xalign=0,
             can_focus=True,


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