From b7385ffcab07848a016e8716212b514ade4f504e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 6 May 2012 03:21:18 +0200 Subject: [PATCH] iconview: Respect item width in size requestr code --- gtk/gtkiconview.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index f4cfe9a370..d06f6af60e 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -1451,6 +1451,14 @@ gtk_icon_view_get_preferred_item_size (GtkIconView *icon_view, cell_area_get_preferred_size (icon_view, context, orientation, for_size, minimum, natural); + if (orientation == GTK_ORIENTATION_HORIZONTAL && priv->item_width >= 0) + { + if (minimum) + *minimum = MAX (*minimum, priv->item_width); + if (natural) + *natural = *minimum; + } + if (minimum) *minimum += 2 * priv->item_padding; if (natural)