From 36ab70ddf5dbe993eb995bd9157f347258765922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 11 Jul 2017 09:58:21 +0200 Subject: 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. --- gtk/gtkfontbutton.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gtk/gtkfontbutton.c') diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index 4f06b92d94..ada22588b0 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -463,17 +463,15 @@ gtk_font_button_measure (GtkWidget *widget, } static void -gtk_font_button_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) +gtk_font_button_size_allocate (GtkWidget *widget, + const GtkAllocation *allocation, + int baseline, + GtkAllocation *out_clip) { GtkFontButton *button = GTK_FONT_BUTTON (widget); GtkFontButtonPrivate *priv = gtk_font_button_get_instance_private (button); - GtkAllocation clip = *allocation; - gtk_widget_size_allocate (priv->button, allocation); - gtk_widget_get_clip (priv->button, &clip); - - gtk_widget_set_clip (widget, &clip); + gtk_widget_size_allocate (priv->button, allocation, baseline, out_clip); } static void -- cgit v1.2.1