[gtk+/wip/otte/queue-resize: 7/32] container: Use correct allocation for calling size_allocate()



commit 73e415c1b54e69ab4b6558f596d4b83ea1d46626
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 28 23:33:28 2015 +0200

    container: Use correct allocation for calling size_allocate()

 gtk/gtkcontainer.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index bdd0257..d601258 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2180,9 +2180,10 @@ gtk_container_real_check_resize (GtkContainer *container)
   GtkWidget *widget = GTK_WIDGET (container);
   GtkAllocation allocation;
   GtkRequisition requisition;
+  int baseline;
 
   gtk_widget_get_preferred_size (widget, &requisition, NULL);
-  _gtk_widget_get_allocation (widget, &allocation);
+  gtk_widget_get_allocated_size (widget, &allocation, &baseline);
 
   if (requisition.width > allocation.width ||
       requisition.height > allocation.height)
@@ -2198,7 +2199,7 @@ gtk_container_real_check_resize (GtkContainer *container)
     }
   else
     {
-      gtk_widget_size_allocate (widget, &allocation);
+      gtk_widget_size_allocate_with_baseline (widget, &allocation, baseline);
     }
 }
 
@@ -2220,6 +2221,7 @@ gtk_container_resize_children (GtkContainer *container)
 {
   GtkAllocation allocation;
   GtkWidget *widget;
+  gint baseline;
 
   /* resizing invariants:
    * toplevels have *always* resize_mode != GTK_RESIZE_PARENT set.
@@ -2229,9 +2231,9 @@ gtk_container_resize_children (GtkContainer *container)
   g_return_if_fail (GTK_IS_CONTAINER (container));
 
   widget = GTK_WIDGET (container);
-  _gtk_widget_get_allocation (widget, &allocation);
+  gtk_widget_get_allocated_size (widget, &allocation, &baseline);
 
-  gtk_widget_size_allocate (widget, &allocation);
+  gtk_widget_size_allocate_with_baseline (widget, &allocation, baseline);
 }
 
 static void


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