diff options
author | Benjamin Otte <otte@redhat.com> | 2016-02-14 15:52:19 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-02-14 15:52:35 +0100 |
commit | 7e47418d0cf93acc73a6ad2d274aa0ac45470d8c (patch) | |
tree | 6eaff5f7b720dc84aff04a6d1e4c411c4f00b946 /gtk/gtkpaned.c | |
parent | 1bfbd23a0c692cf8b19dd86448eaa9ba8e6cb8af (diff) | |
download | gtk+-7e47418d0cf93acc73a6ad2d274aa0ac45470d8c.tar.gz |
paned: rtl-flip with the correct rectangle
Diffstat (limited to 'gtk/gtkpaned.c')
-rw-r--r-- | gtk/gtkpaned.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 0e21a88b97..33d5a07f5f 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -1290,15 +1290,13 @@ gtk_paned_get_preferred_height_for_width (GtkWidget *widget, } static void -flip_child (GtkWidget *widget, - GtkAllocation *child_pos) +flip_child (const GtkAllocation *allocation, + GtkAllocation *child_pos) { - GtkAllocation allocation; gint x, width; - gtk_widget_get_allocation (widget, &allocation); - x = allocation.x; - width = allocation.width; + x = allocation->x; + width = allocation->width; child_pos->x = 2 * x + width - child_pos->x - child_pos->width; } @@ -1424,9 +1422,9 @@ gtk_paned_allocate (GtkCssGadget *gadget, if (gtk_widget_get_direction (GTK_WIDGET (widget)) == GTK_TEXT_DIR_RTL) { - flip_child (widget, &(window2_allocation)); - flip_child (widget, &(window1_allocation)); - flip_child (widget, &(priv->handle_pos)); + flip_child (allocation, &(window2_allocation)); + flip_child (allocation, &(window1_allocation)); + flip_child (allocation, &(priv->handle_pos)); } child1_allocation.x = child1_allocation.y = 0; |