This was broken in wrapping labels.
Testcase included.
/* Minimum width is as many line breaks as possible */
layout = gtk_label_get_measuring_layout (self, NULL, MAX (minimum_default, 0));
pango_layout_get_size (layout, minimum_width, NULL);
+ *minimum_width = MAX (*minimum_width, minimum_default);
/* Natural width is natural width - or as wide as possible */
layout = gtk_label_get_measuring_layout (self, layout, natural_default);
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window1">
+ <property name="decorated">0</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="label" translatable="yes">Hello World</property>
+ <property name="width-chars">20</property>
+ </object>
+ </child>
+ </object>
+</interface>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow" id="window1">
+ <property name="decorated">0</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="label" translatable="yes">Hello World</property>
+ <property name="wrap">1</property>
+ <property name="width-chars">20</property>
+ </object>
+ </child>
+ </object>
+</interface>
'label-text-shadow-changes-modify-clip.ui',
'label-width-chars-dont-shrink.ref.ui',
'label-width-chars-dont-shrink.ui',
+ 'label-wrap-width-chars.ref.ui',
+ 'label-wrap-width-chars.ui',
'label-wrapped-huge-max-width-chars.ref.ui',
'label-wrapped-huge-max-width-chars.ui',
# this seems to make assumptions on text positioning