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 692063 - Regression: IconView shows incorrectly when choosing "-1" (automatic) columns
Regression: IconView shows incorrectly when choosing "-1" (automatic) columns
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkIconView
3.6.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-01-19 11:05 UTC by raster
Modified: 2018-04-14 23:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple example that triggers this bug in IconView (808 bytes, application/x-bzip)
2013-01-19 11:05 UTC, raster
Details
Bug in action: the columns expands horizontally, and there's unused blank space in the bottom (28.75 KB, image/png)
2013-01-19 11:09 UTC, raster
Details
Iconview working fine under Debian testing (30.33 KB, image/png)
2013-01-19 11:13 UTC, raster
Details
trimed vala-generated code (1.90 KB, text/plain)
2013-01-19 18:34 UTC, Rafał Mużyło
Details

Description raster 2013-01-19 11:05:45 UTC
Created attachment 233855 [details]
Simple example that triggers this bug in IconView

A Gtk.IconView with a "-1" number of columns should never need horizontal scroll. In Gtk2 and up to Gtk 3.4 this is true, but in Gtk 3.6 it seems to have slipped a regression, because when the icons can't fit inside, the widget adds both vertical and horizontal scroll bars, and distribute the icons horizontally, leaving a big blank space in the bottom.

I attach screenshots and an example code (in Vala). This code has been tested in:

Ubuntu 12.04 (Gtk 3.4.2): works fine
Debian testing (Gtk 3.4.2): works fine
Ubuntu 12.10 (Gtk 3.6.0): shows the bug
Fedora 18 (Gtk 3.6.4): shows the bug
Comment 1 raster 2013-01-19 11:09:03 UTC
Created attachment 233856 [details]
Bug in action: the columns expands horizontally, and there's unused blank space in the bottom
Comment 2 raster 2013-01-19 11:13:08 UTC
Created attachment 233857 [details]
Iconview working fine under Debian testing
Comment 3 Rafał Mużyło 2013-01-19 18:34:02 UTC
Created attachment 233885 [details]
trimed vala-generated code

This might not be a gtk+ bug, at least not quite.

If I trimmed the generated c code correctly, technically vala isn't using the proper function to add GtkIconView to a GtkScrolledWindow.

In the attached code, note the '#ifdef' block: vala used gtk_scrolled_window_add_with_viewport, the proper for this widget is gtk_container_add.
Comment 4 raster 2013-01-19 22:06:23 UTC
Yes, you are right: if I replace "this.scroll.add_with_viewport(this.path_view);" with "this.scroll.add(this.path_view);", it works fine.

The bug in my original code was because I started with Gtk2, and the added support for Gtk3. In Gtk2 iconView has not viewport capabilities, but in Gtk3 it has.

The question is why with old versions of Gtk 3 it worked :?
Comment 5 Matthias Clasen 2018-02-10 04:53:56 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 6 Matthias Clasen 2018-04-14 23:54:47 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new