[gtk+/wip/otte/queue-resize: 9/31] container: Use correct allocation for calling size_allocate()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/queue-resize: 9/31] container: Use correct allocation for calling size_allocate()
- Date: Tue, 29 Sep 2015 21:22:31 +0000 (UTC)
commit a885618f614a81b29c1b667ad5251bee83b8f72d
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 320b302..8b3cc3a 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2177,10 +2177,11 @@ 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)
@@ -2196,7 +2197,7 @@ gtk_container_real_check_resize (GtkContainer *container)
}
else
{
- gtk_widget_size_allocate (widget, &allocation);
+ gtk_widget_size_allocate_with_baseline (widget, &allocation, baseline);
}
}
@@ -2218,6 +2219,7 @@ gtk_container_resize_children (GtkContainer *container)
{
GtkAllocation allocation;
GtkWidget *widget;
+ gint baseline;
/* resizing invariants:
* toplevels have *always* resize_mode != GTK_RESIZE_PARENT set.
@@ -2227,9 +2229,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]