mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
iconview: Include column spacing in calculation
The function is probably almost never used, so nobody has ever seen this bug, but we should still get it right. https://bugzilla.gnome.org/show_bug.cgi?id=677809
This commit is contained in:
parent
4b83be0e26
commit
7c1b561194
@ -1668,8 +1668,8 @@ gtk_icon_view_get_preferred_width_for_height (GtkWidget *widget,
|
||||
n_items = gtk_icon_view_get_n_items (icon_view);
|
||||
|
||||
gtk_icon_view_get_preferred_item_size (icon_view, GTK_ORIENTATION_HORIZONTAL, row_height, &item_min, &item_nat);
|
||||
*minimum = item_min * ((n_items + rows - 1) / rows);
|
||||
*natural = item_nat * ((n_items + rows - 1) / rows);
|
||||
*minimum = (item_min + priv->column_spacing) * ((n_items + rows - 1) / rows) - priv->column_spacing;
|
||||
*natural = (item_nat + priv->column_spacing) * ((n_items + rows - 1) / rows) - priv->column_spacing;
|
||||
|
||||
*minimum += 2 * priv->margin;
|
||||
*natural += 2 * priv->margin;
|
||||
|
Loading…
Reference in New Issue
Block a user