[gtk+/wip/baedert/progressbar: 12/14] frame: Compute clip directly
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/progressbar: 12/14] frame: Compute clip directly
- Date: Tue, 25 Apr 2017 11:09:13 +0000 (UTC)
commit 02ff0ab3eca5db5f54647d81156a7acd4d09af3a
Author: Timm Bäder <mail baedert org>
Date: Tue Apr 25 08:11:51 2017 +0200
frame: Compute clip directly
gtk/gtkframe.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 0a5ae21..1011d00 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -688,7 +688,7 @@ static void
gtk_frame_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
gtk_widget_set_allocation (widget, allocation);
@@ -712,6 +712,7 @@ gtk_frame_allocate (GtkCssGadget *gadget,
GtkFramePrivate *priv;
GtkWidget *child;
GtkAllocation new_allocation;
+ GtkAllocation clip;
widget = gtk_css_gadget_get_owner (gadget);
frame = GTK_FRAME (widget);
@@ -743,13 +744,17 @@ gtk_frame_allocate (GtkCssGadget *gadget,
priv->label_allocation.width = width;
gtk_widget_size_allocate (priv->label_widget, &priv->label_allocation);
+ gtk_widget_get_clip (priv->label_widget, &clip);
+ gdk_rectangle_union (out_clip, out_clip, &clip);
}
child = gtk_bin_get_child (GTK_BIN (widget));
if (child && gtk_widget_get_visible (child))
- gtk_widget_size_allocate (child, &priv->child_allocation);
-
- gtk_container_get_children_clip (GTK_CONTAINER (widget), out_clip);
+ {
+ gtk_widget_size_allocate (child, &priv->child_allocation);
+ gtk_widget_get_clip (child, &clip);
+ gdk_rectangle_union (out_clip, out_clip, &clip);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]