Open Bug 1321332 Opened 3 years ago Updated 2 years ago

Problems with long filenames in the image preview in the (gtk3) filechooser

Categories

(Core :: Widget: Gtk, defect, P4)

50 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: allo, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: tpi:+)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20161104212021

Steps to reproduce:

The Filechooser behaves badly since firefox changed from gtk2 to gtk3


Actual results:

a nice filechooser, with a list of constant size and a preview area of constant size


Expected results:

When browsing with arrow up/down through the files, the preview area grows and shrinks depending on the length of the filename.

This is according to Gnome Bug https://bugzilla.gnome.org/show_bug.cgi?id=775302
no gtk issue but a firefox issue, as gtk doesn't implement the preview itself.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Version: 49 Branch → 50 Branch
Blocks: gtk3
Component: Untriaged → Widget: Gtk
Product: Firefox → Core
(Copied from the Gnome Bugtracker)


Steps to reproduce:
- Create a folder
- place there two images, a.jpg and bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.jpg
- open the filechooser and select first a.jpg and then b...b.jpg

expected behaviour:
Preview area has a fixed size, displays a previews and abbreviates the filename shown above, the file list has a fixed size and abbreviates the filenames as needed.

actual behaviour:
Preview area changes the size all the time, when navigating through a folder with filenames of different length
Priority: -- → P4
Summary: Problems with the image preview in the (gtk3) filechooser → Problems with long filenames in the image preview in the (gtk3) filechooser
Another issue with the change: The gtk2 filechooser was very fast in folders with a lot of images (much faster as i.e. the kde filechooser), but the gtk3 filechooser now has a loooong loading time until you can navigate in the file list or even type a filename for the saved image.
I would guess this has something to do with prerendering thumbnails or something like this.
Whiteboard: tpi:+
Which DE do you run? I don't see that bug in gnome-shell for instance - the file chooser is always almost maximized.
Flags: needinfo?(allo)
KDE Plasma 5.

The middle part of the filechooser seems to have a minimum size. When making the window smaller, the right part shrinks first, then the left part shrinks to a minimum size, last the right part.
When making it bigger again, first the right part grows up to the length of the filename to display, then the middle part grows, while the file list on the left stays at the small size.
clicking a.jpg / bb..bb.jpg the middle and right part grow/shrink while the folder list keeps it size even when it's not minimum size, yet.
Flags: needinfo?(allo)
Can you check if that affects other gnome application? For instance run "eog" - gnome image viewer and try to open any image.
Flags: needinfo?(allo)
Happens with eog as well.
But see the link in the original post, the gnome people said implementation of the preview is no part of the filechooser. So possibly eog and firefox use the same code to extend the filechooser?
Flags: needinfo?(allo)
(In reply to alex from comment #7)
> Happens with eog as well.
> But see the link in the original post, the gnome people said implementation
> of the preview is no part of the filechooser. So possibly eog and firefox
> use the same code to extend the filechooser?

The implementation is done by your DE - KDE Plasma 5 in your case. If you run gnome-shell you'll see completely different filechooser with different behavior. So it's KDE bug in this case and Firefox can't fix that.
I am NOT talking about a KDE/Qt file chooser. While chrome uses the desktop's native file chooser, Firefox always uses the gtk3 one (here) and I would be surprised if the KDE project implements an own gtk3 file chooser. And the gnome project implements it, but preview is added by the applications using it, according to the bug there.
Well, eog is a native gnome application which has correct file chooser implementation. If you don't believe me feel free to test other gnome applications which have file preview - gimp, envince, etc. When Firefox behaves the same as other gnome apps there's noting Firefox itself can fix.
Eog has the same problem here. I reported it in the gnome bug. I am still not sure who's actually responsible, but the bug is there. Currently I suspect there is some "add an image preview" boilerplate code for this used both by Eog and Firefox. I do not think KDE is involved at all but can test under another desktop later. Further it may depend on the exact gtk version.
Tested it on a ubuntu mate 16.10 livecd with a fresh firefox 54 download. The same problem as here on Debian buster and like in the screenshots.
You need to log in before you can comment on or make changes to this bug.