After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 418047 - GtkIconView sizing is very broken
GtkIconView sizing is very broken
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkIconView
unspecified
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-03-13 23:11 UTC by Alex Graveley
Modified: 2007-07-03 14:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
iconview-size.patch (807 bytes, patch)
2007-03-19 05:20 UTC, Matthias Clasen
accepted-commit_now Details | Review

Description Alex Graveley 2007-03-13 23:11:43 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.
Comment 1 Alex Graveley 2007-03-14 00:31:04 UTC
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.
Comment 2 Matthias Clasen 2007-03-19 05:19:50 UTC
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 ?
Comment 3 Matthias Clasen 2007-03-19 05:20:45 UTC
Created attachment 84863 [details] [review]
iconview-size.patch
Comment 4 Matthias Clasen 2007-05-30 12:24:42 UTC
Mitch confirms that this patch work great for the gimp's icon view problems.
Comment 5 Matthias Clasen 2007-05-30 13:37:04 UTC
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)