Commit 6ea4c1a1 authored by Alban Browaeys's avatar Alban Browaeys Committed by Matthias Clasen

paned: minus the size by the handle for the for_child1 computation.

Fixes:
(rhythmbox:22802): Gtk-CRITICAL **:
_gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed

that is gtk_paned_get_preferred_size_for_opposite_orientation calls
_gtk_widget_get_preferred_size_for_size on child2 with a negative
size.

As gtkpaned size was (32), child1 minimum size was (55) then
for_child1 became (32) for an handle_size of (5). Thus for_child2
ended up as (-5).

https://bugzilla.gnome.org/show_bug.cgi?id=705624
parent b7e41a7e
......@@ -995,7 +995,7 @@ gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget *widget,
_gtk_widget_get_preferred_size_for_size (priv->child2, priv->orientation, -1, &child2_req, NULL, NULL, NULL);
gtk_paned_compute_position (paned,
size, child1_req, child2_req,
size - handle_size, child1_req, child2_req,
NULL, NULL, &for_child1);
for_child2 = size - for_child1 - handle_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment