GNOME Bugzilla – Bug 692063
Regression: IconView shows incorrectly when choosing "-1" (automatic) columns
Last modified: 2018-04-14 23:54:47 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
Created attachment 233856 [details] Bug in action: the columns expands horizontally, and there's unused blank space in the bottom
Created attachment 233857 [details] Iconview working fine under Debian testing
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.
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 :?
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.
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