From ff0eb0320136fe7f254edcec978f8af0df8436b9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 25 Apr 2010 16:23:01 -0400 Subject: [PATCH] Fix a regression in RTL flipping This was only showing up with pack-end packing in horizontal boxes. The RTL flipping has to be applied after moving the reference point to the left edge of the child. --- gtk/gtkbox.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 96009696be..76dd255354 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -555,9 +555,6 @@ gtk_box_size_allocate (GtkWidget *widget, child_allocation.width = sizes[i].minimum_size; child_allocation.x = x + (child_size - child_allocation.width) / 2; } - - if (direction == GTK_TEXT_DIR_RTL) - child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width; if (packing == GTK_PACK_START) { @@ -567,8 +564,12 @@ gtk_box_size_allocate (GtkWidget *widget, { x -= child_size + box->spacing; - child_allocation.x -= child_allocation.width; + child_allocation.x -= child_size; } + + if (direction == GTK_TEXT_DIR_RTL) + child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width; + } else /* (private->orientation == GTK_ORIENTATION_VERTICAL) */ { @@ -591,11 +592,10 @@ gtk_box_size_allocate (GtkWidget *widget, { y -= child_size + box->spacing; - child_allocation.y -= child_allocation.height; + child_allocation.y -= child_size; } } gtk_widget_size_allocate (child->widget, &child_allocation); - } i += 1;