GtkGrid: Add forgotten RTL flipping

How did we manage to add a non-RTL savy container in GTK+ 3.0 ?
This commit is contained in:
Matthias Clasen 2011-03-30 02:24:00 -04:00
parent 93b0cecd7e
commit 7a65db0402
2 changed files with 7 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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 ();