[gtk+/gtk-3-4] iconview: Respect item width in size requestr code



commit 77904e1f4000f8c5317f0f1376c3f8e50f0451fe
Author: Benjamin Otte <otte redhat com>
Date:   Sun May 6 03:21:18 2012 +0200

    iconview: Respect item width in size requestr code

 gtk/gtkiconview.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index f4cfe9a..d06f6af 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]