GNOME Bugzilla – Bug 418047
GtkIconView sizing is very broken
Last modified: 2007-07-03 14:40:28 UTC
GtkIconView does not size-request anything close to it's needed size, and only works inside of a scrolled window. I would try explain this more, but it's so broken so as to approach randomness. In Gimmie, I've resorted to a hack to put an IconView into a scrolled window that size requests the adjustment's upper bounds. Even this only works about 70% of the time. See _scroll_get_best_size() in http://svn.gnome.org/viewcvs/gimmie/trunk/gimmie/gimmie_applet.py?revision=345&view=markup to how this is being done currently.
So I just committed some tweaks to Gimmie that improve the situation. Thought it might be helpful to mention them here... I now do a queue_resize_no_draw on the parent scrolled window whenever the adjustment changes, and in the scrolled window's size_request I return False if the adjustment's upper is 0 or the current allocation.
I guess this is because the icon view never updates its size request when the content changes... Does the following patch improve things for you ?
Created attachment 84863 [details] [review] iconview-size.patch
Mitch confirms that this patch work great for the gimp's icon view problems.
2007-05-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtkiconview.c (gtk_icon_view_layout): Queue a resize if the size changed. (#418047, Alex Graveley)