diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-31 21:02:28 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-04-05 14:56:38 +0200 |
commit | 169203951b1a338e0a7ef737238731619e5b8c4a (patch) | |
tree | 61eebf0a1f0a4b777e3ce58e779b2aa5fda31f63 /gtk/gtkswitch.c | |
parent | fc6de135fe30ad285c50267bc9d24e10135bcc2c (diff) | |
download | gtk+-169203951b1a338e0a7ef737238731619e5b8c4a.tar.gz |
widget: Remove clip from size-allocate vfunc
As the clip is no longer needed, get rid of it.
Diffstat (limited to 'gtk/gtkswitch.c')
-rw-r--r-- | gtk/gtkswitch.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index 71121abb57..fb3b21f732 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -318,12 +318,10 @@ gtk_switch_measure (GtkWidget *widget, static void gtk_switch_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, - int baseline, - GtkAllocation *out_clip) + int baseline) { GtkSwitch *self = GTK_SWITCH (widget); GtkSwitchPrivate *priv = gtk_switch_get_instance_private (self); - GtkAllocation child_clip; GtkAllocation child_alloc; GtkAllocation slider_alloc; int min; @@ -333,8 +331,7 @@ gtk_switch_size_allocate (GtkWidget *widget, slider_alloc.width = allocation->width / 2; slider_alloc.height = allocation->height; - gtk_widget_size_allocate (priv->slider, &slider_alloc, -1, &child_clip); - gdk_rectangle_union (out_clip, &child_clip, out_clip); + gtk_widget_size_allocate (priv->slider, &slider_alloc, -1); /* Center ON label in left half */ @@ -344,8 +341,7 @@ gtk_switch_size_allocate (GtkWidget *widget, gtk_widget_measure (priv->on_label, GTK_ORIENTATION_VERTICAL, min, &min, NULL, NULL, NULL); child_alloc.y = (allocation->height - min) / 2; child_alloc.height = min; - gtk_widget_size_allocate (priv->on_label, &child_alloc, -1, &child_clip); - gdk_rectangle_union (out_clip, &child_clip, out_clip); + gtk_widget_size_allocate (priv->on_label, &child_alloc, -1); /* Center OFF label in right half */ gtk_widget_measure (priv->off_label, GTK_ORIENTATION_HORIZONTAL, -1, &min, NULL, NULL, NULL); @@ -354,8 +350,7 @@ gtk_switch_size_allocate (GtkWidget *widget, gtk_widget_measure (priv->off_label, GTK_ORIENTATION_VERTICAL, min, &min, NULL, NULL, NULL); child_alloc.y = (allocation->height - min) / 2; child_alloc.height = min; - gtk_widget_size_allocate (priv->off_label, &child_alloc, -1, &child_clip); - gdk_rectangle_union (out_clip, &child_clip, out_clip); + gtk_widget_size_allocate (priv->off_label, &child_alloc, -1); } static void |