[gtk+/wip/baedert/drawing: 31/54] buttonbox: Compute clip directly
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 31/54] buttonbox: Compute clip directly
- Date: Wed, 28 Jun 2017 11:26:21 +0000 (UTC)
commit c29e03c7b31d7c5cc080c87ee25a3f24509dd24a
Author: Timm Bäder <mail baedert org>
Date: Sun Jun 25 18:55:42 2017 +0200
buttonbox: Compute clip directly
gtk/gtkbbox.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index f78f5b0..549870f 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -769,7 +769,8 @@ gtk_button_box_size_allocate (GtkWidget *widget,
gint baseline;
gint child_baseline;
gint i;
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
+ GdkRectangle child_clip;
if (priv->layout_style == GTK_BUTTONBOX_EXPAND)
{
@@ -1026,6 +1027,8 @@ gtk_button_box_size_allocate (GtkWidget *widget,
}
gtk_widget_size_allocate_with_baseline (child, &child_allocation, child_baseline);
+ gtk_widget_get_clip (child, &child_clip);
+ gdk_rectangle_union (&clip, &child_clip, &clip);
i++;
}
}
@@ -1035,8 +1038,6 @@ gtk_button_box_size_allocate (GtkWidget *widget,
g_free (heights);
g_free (baselines);
- gtk_container_get_children_clip (GTK_CONTAINER (widget), &clip);
-
gtk_widget_set_clip (widget, &clip);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]