paned: Always query at least min size
authorBenjamin Otte <otte@redhat.com>
Sat, 20 Nov 2021 04:56:14 +0000 (05:56 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 20 Nov 2021 05:04:10 +0000 (06:04 +0100)
For shrinking children, we would not make sure of this and just throw
the current size at them.

gtk/gtkpaned.c

index e4d8ff8124f476866e0c5d88c0d75bcf0af889d7..aebfd91ac723ea3d17bfd285d0d6f988dae37ac6 100644 (file)
@@ -1184,6 +1184,11 @@ gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget      *widget,
                                   NULL, NULL, &for_start_child);
 
       for_end_child = size - for_start_child - handle_size;
+
+      if (paned->shrink_start_child)
+        for_start_child = MAX (start_child_req, for_start_child);
+      if (paned->shrink_end_child)
+        for_end_child = MAX (end_child_req, for_end_child);
     }
   else
     {