mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
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:
parent
93b0cecd7e
commit
7a65db0402
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 ();
|
||||
|
Loading…
Reference in New Issue
Block a user