diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index 4719857944..440b4d5400 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -1195,6 +1195,10 @@ gtk_grid_request_allocate_children (GtkGridRequest *request) child_allocation.width = MAX (1, width); child_allocation.height = MAX (1, height); + if (gtk_widget_get_direction (GTK_WIDGET (request->grid)) == GTK_TEXT_DIR_RTL) + child_allocation.x = allocation.x + allocation.width + - (child_allocation.x - allocation.x) - child_allocation.width; + gtk_widget_size_allocate (child->widget, &child_allocation); } } diff --git a/tests/testgrid.c b/tests/testgrid.c index a59aefeee9..f9e85bb99c 100644 --- a/tests/testgrid.c +++ b/tests/testgrid.c @@ -252,6 +252,9 @@ main (int argc, char *argv[]) { gtk_init (NULL, NULL); + if (g_getenv ("RTL")) + gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); + simple_grid (); text_grid (); box_comparison ();