summaryrefslogtreecommitdiff
path: root/gtk/gtkcontainer.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-07-11 09:58:21 +0200
committerMatthias Clasen <mclasen@redhat.com>2017-07-19 21:27:16 -0400
commit36ab70ddf5dbe993eb995bd9157f347258765922 (patch)
tree508f0ca9cf6b4fc990e88b0a5892b50f594890fe /gtk/gtkcontainer.c
parent95bd58ac00ede771ca80684e143fffdc61ff2194 (diff)
downloadgtk+-36ab70ddf5dbe993eb995bd9157f347258765922.tar.gz
widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well change the size-allocate signature to include a out_clip parameter, just like GtkCssGadget did. And since we now always propagate baselines, we might as well pass that one on to size-allocate. This way we can also make sure to transform the clip returned from size-allocate to parent-coordinates, i.e. the same coordinate space priv->allocation is in.
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r--gtk/gtkcontainer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 8180939f17..0a2dbf9aec 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1818,6 +1818,7 @@ gtk_container_real_check_resize (GtkContainer *container)
{
if (!_gtk_widget_is_toplevel (widget))
{
+ GtkAllocation clip;
gtk_widget_get_preferred_size (widget, &requisition, NULL);
gtk_widget_get_allocated_size (widget, &allocation, &baseline);
@@ -1825,7 +1826,7 @@ gtk_container_real_check_resize (GtkContainer *container)
allocation.width = requisition.width;
if (allocation.height < requisition.height)
allocation.height = requisition.height;
- gtk_widget_size_allocate_with_baseline (widget, &allocation, baseline);
+ gtk_widget_size_allocate (widget, &allocation, baseline, &clip);
}
else
gtk_widget_queue_resize (widget);