diff options
author | Timm Bäder <mail@baedert.org> | 2017-07-11 09:58:21 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-07-19 21:27:16 -0400 |
commit | 36ab70ddf5dbe993eb995bd9157f347258765922 (patch) | |
tree | 508f0ca9cf6b4fc990e88b0a5892b50f594890fe /gtk/gtkappchooserwidget.c | |
parent | 95bd58ac00ede771ca80684e143fffdc61ff2194 (diff) | |
download | gtk+-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/gtkappchooserwidget.c')
-rw-r--r-- | gtk/gtkappchooserwidget.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c index 9086bfbb0e..1cd3b1458b 100644 --- a/gtk/gtkappchooserwidget.c +++ b/gtk/gtkappchooserwidget.c @@ -971,15 +971,17 @@ gtk_app_chooser_widget_snapshot (GtkWidget *widget, } static void -gtk_app_chooser_widget_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) +gtk_app_chooser_widget_size_allocate (GtkWidget *widget, + const GtkAllocation *allocation, + int baseline, + GtkAllocation *out_clip) { GtkAppChooserWidget *self = GTK_APP_CHOOSER_WIDGET (widget); GtkAppChooserWidgetPrivate *priv = gtk_app_chooser_widget_get_instance_private (self); - GTK_WIDGET_CLASS (gtk_app_chooser_widget_parent_class)->size_allocate (widget, allocation); + GTK_WIDGET_CLASS (gtk_app_chooser_widget_parent_class)->size_allocate (widget, allocation, baseline, out_clip); - gtk_widget_size_allocate (priv->overlay, allocation); + gtk_widget_size_allocate (priv->overlay, allocation, baseline, out_clip); } static void |