mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
iconview: Bring back rtl flipping
This was lost in the recent layout rewrite.
This commit is contained in:
parent
f77b690e26
commit
1685b2b220
@ -2854,6 +2854,10 @@ gtk_icon_view_layout (GtkIconView *icon_view)
|
||||
gint n_columns, n_rows, n_items;
|
||||
gint col, row;
|
||||
GtkRequestedSize *sizes;
|
||||
gboolean rtl;
|
||||
|
||||
rtl = gtk_widget_get_direction (GTK_WIDGET (icon_view)) == GTK_TEXT_DIR_RTL;
|
||||
|
||||
|
||||
n_items = gtk_icon_view_get_n_items (icon_view);
|
||||
|
||||
@ -2952,8 +2956,13 @@ gtk_icon_view_layout (GtkIconView *icon_view)
|
||||
item->cell_area.height = sizes[row].minimum_size;
|
||||
item->row = row;
|
||||
item->col = col;
|
||||
if (rtl)
|
||||
{
|
||||
item->cell_area.x = priv->width - item_width - item->cell_area.x;
|
||||
item->col = n_columns - 1 - col;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
priv->height += sizes[row].minimum_size + priv->item_padding + priv->row_spacing;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user