diff options
author | Timm Bäder <mail@baedert.org> | 2017-06-28 07:38:54 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-07-19 21:27:15 -0400 |
commit | 6f7387cd25bdb64f2fa61a12eaef08b3341c590a (patch) | |
tree | e5594f77e593d225d97f4afdd0cbb7948d98a02b /gtk/gtkpaned.c | |
parent | aa5cb1648cc475626c1844994071eac912e2089e (diff) | |
download | gtk+-6f7387cd25bdb64f2fa61a12eaef08b3341c590a.tar.gz |
paned: Fix clip node coordinates
Diffstat (limited to 'gtk/gtkpaned.c')
-rw-r--r-- | gtk/gtkpaned.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 887999fd63..7ce9e5d2ae 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -1420,15 +1420,14 @@ gtk_paned_snapshot (GtkWidget *widget, GtkSnapshot *snapshot) { GtkPanedPrivate *priv = gtk_paned_get_instance_private (GTK_PANED (widget)); - GtkAllocation widget_allocation; GtkAllocation child_allocation; + int width, height; - gtk_widget_get_allocation (widget, &widget_allocation); + gtk_widget_get_content_size (widget, &width, &height); gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_INIT ( 0, 0, - widget_allocation.width, - widget_allocation.height + width, height ), "GtkPaned"); @@ -1438,11 +1437,11 @@ gtk_paned_snapshot (GtkWidget *widget, if (priv->child1 && gtk_widget_get_visible (priv->child1)) { - gtk_widget_get_allocation (priv->child1, &child_allocation); + gtk_widget_get_outer_allocation (priv->child1, &child_allocation); gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_INIT ( - child_allocation.x - widget_allocation.x, - child_allocation.y - widget_allocation.y, + child_allocation.x, + child_allocation.y, child_allocation.width, child_allocation.height ), @@ -1453,11 +1452,11 @@ gtk_paned_snapshot (GtkWidget *widget, if (priv->child2 && gtk_widget_get_visible (priv->child2)) { - gtk_widget_get_allocation (priv->child2, &child_allocation); + gtk_widget_get_outer_allocation (priv->child2, &child_allocation); gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_INIT ( - child_allocation.x - widget_allocation.x, - child_allocation.y - widget_allocation.y, + child_allocation.x, + child_allocation.y, child_allocation.width, child_allocation.height ), |