summaryrefslogtreecommitdiff
path: root/gtk/gtkpaned.c
diff options
context:
space:
mode:
authorAlban Browaeys <prahal@yahoo.com>2013-08-07 18:46:07 +0200
committerMatthias Clasen <mclasen@redhat.com>2013-08-14 00:10:08 -0400
commit6ea4c1a1f4bd42eac4b0384c390be6732a02763f (patch)
tree6e6f63227659724b07c40e4345aae5e711061614 /gtk/gtkpaned.c
parentb7e41a7eda1d01dc48b54d5d91916f2f737fceff (diff)
downloadgtk+-6ea4c1a1f4bd42eac4b0384c390be6732a02763f.tar.gz
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
Diffstat (limited to 'gtk/gtkpaned.c')
-rw-r--r--gtk/gtkpaned.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index b929e4ac8d..73aa1aa091 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -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;