[gtk+] paned: minus the size by the handle for the for_child1 computation.



commit 6ea4c1a1f4bd42eac4b0384c390be6732a02763f
Author: Alban Browaeys <prahal yahoo com>
Date:   Wed Aug 7 18:46:07 2013 +0200

    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

 gtk/gtkpaned.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index b929e4a..73aa1aa 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;


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