Icon grid layout changes when thumbnail generation completes in dir containing portrait images
Affected version
- Nightly flatpak: Yes
- Other: Multiple distributions, all Nautilus versions can I remember up to and including GNOME 44.
Steps to reproduce
- Have a directory which contains only large images (which need thumbnails) in portrait aspect ratio, and no other files or subdirectories.
- Clear your thumbnail cache.
- Open the directory in Nautilus in Grid View.
Current behavior
While the thumbnails are being generated, a placeholder rectangle is shown. As each thumbnail finishes generating, the placeholder is replaced by the thumbnail, which has the same aspect ratio as the original image.
Once all of the thumbnails have finished generating, the layout of the icon grid changes - each grid item becomes slightly narrower / closer together. With the default window size and icon size, the reduction in width is often enough that it allows Nautilus to fit an additional item into each grid row, meaning that all of the files in the view get re-arranged.
Example: In Nautilus Nightly Flatpak (2023-08-31), I clear the thumbnail cache and reload the directory. Screencast_from_2023-08-31_15-51-24
Also, if you move a file with a normal icon (e.g. a text file) or a landscape thumbnail into the directory, it will re-layout with wider columns. It'll revert back to narrow columns if the file is removed.
Expected behavior
The spacing between icons in Grid View and the number of icons per row should stay the same regardless of the aspect ratio of images being thumbnailed, and also should not depend on what types of files (thumbnailable or not thumbnailable) are in the directory.