GNOME Bugzilla – Bug 753704
Wrap file names in the picture gallery icon view
Last modified: 2018-02-26 12:52:38 UTC
The picture gallery, implemented some years ago in bug #567879, feels quite awkward: - It is not clear what you should do with the pictures in it. Tried double-clicking or right-clicking, nothing happens; you have to drag and drop from it. - It is redundant with the "Insert image" button in the same toolbar - Also somewhat redundant with drag & drop or file attachments And: - Uses vertical space and the full width, which is a bit weird with 16:10/16:9 - The thumbnails are so big they each take the full height of the area - All the images in ~/Pictures are shown - Long filenames in ~/Pictures break the iconviow, showing a single column ...which leads to endless scrolling. Really, do people actually use that instead of the "Insert image" button, or a smarter drag & drop (bug #753703)?
Created attachment 368880 [details] [review] patch to allow text to wrap Here is a trivial patch that fixes the biggest problem. It now lets the text wrap, coherent with the width of the thumbnails, and not only does it look prettier, you can now fit a ton more columns in the same space. Please test and merge it (I've only written it as a theoretical fix, based on my experiments with Gtk Inspector) with git am if it works on your end too. I'll attach some before/after screenshots below.
Created attachment 368881 [details] screenshot before patch 368880
Created attachment 368882 [details] screenshot after patch 368880
I have some other suggestions too, but I couldn't find how to _easily_ do it, as I couldn't find the code that actually creates the GtkPaned that separates the main webkit view from the gallery's GtkScrolledWindow. Anyway I could confirm (with Gtk Inspector) that these additional fixes would help a LOT too, both of which would be one-liners: - Set the Paned's "wide-handle" property to TRUE (allows easily distinguishing the gallery from the webkit view, visually). - Set the Paned's "orientation" property to GTK_ORIENTATION_VERTICAL. This will let the gallery be much much much more useful with today's (widescreen) computer monitors. I wasn't able to figure out how to make it so that the vertical paned would have the minimum width of one iconview column (a bit over 128 pixels) though...
Created attachment 368884 [details] screenshot of proposed gallery orientation changes - before
Created attachment 368885 [details] screenshot of proposed gallery orientation changes - after Wide-screen-friendlier layout of the gallery. Note that you could do even better than that if the gallery widget is moved to be on the "side" of a GtkBox containing the gallery on one hand and the From/To/CC/BCC/edit-toolbar/edit-view, so that the From/To/CC/BCC/etc. fields can "wrap" around the gallery and give you more vertical space for the gallery... but that's a much more invasive change than a one-line "change the Paned's orientation property" ;)
Thanks for the patch. It doesn't compile (missing semicolon), but that's no bug deal. I added to it also the "wide-handle". I do not agree with the changed orientation of the GtkPaned, because I'd expect to have the message text on the left, not on the right. That means that: a) there should be a user option to set the orientation of the GtkPaned b) widgets should be packed into this GtkPaned in an order depending on the setting from a). Better to open a separate bug report for it, also because I'm closing this one in favour of your patch. By the way, the 128x128 thumbnail is only for larger images than this. If you have smaller images, then the part of the thumbnail is mostly empty. Created commit dabda1058c in evo master (3.27.92+)