With the default XFCE 1x window scaling, xlarge thumbnails look like this:
But when going in XFCE's Appearance > Settings and setting Window Scaling to 2x, then zooming to get the same grid size (as shown by the blue background on the selected file matching with the previous image), thumbnails use the large size instead of xlarge:
This issue applies to further zoom levels.
I think either the thumbnails should be bigger or the grid should be smaller, in order not to waste screen space.
I don't have time to look into this. Further investigation / a fix would be very welcome!
I would add that even in your screenshots, there's a lot of wasted vertical screen space, which may be worth another issue.
Sure, though out of scope of this issue / to be fixed via #693. Afaik we as well have some bug for increasing the file-names together with the thumbnails, though I currently fail to find it.
Not sure what the thumbnail sizes are, but should be fine to just use whatever thumbnail is 2x the size that'd be used on a 1x UI scale, and then load it into a cairo_surface_t with the surface's scale factor set to 2.
Unfortunately I don't recall how/where the thumbnails in the icon view get loaded...
thunar_zoom_level_to_thumbnail_size calls it, which itself is called in thunar_standard_view_set_zoom_level.
Inside there one could do scale_factor = gtk_widget_get_scale_factor (GTK_WIDGET (view)); and pass the scale_factor down to thunar_icon_size_to_thumbnail_size.
Not sure for it's other caller, thunar_thumbnail_size_from_icon_size … maybe a factor of 1 would do the job ?
Not sure for it's other caller, thunar_thumbnail_size_from_icon_size … maybe a factor of 1 would do the job ?
My tests show that the correct factor needs to be (somehow) passed to thunar_thumbnail_size_from_icon_size so that the thumbnails appear properly sized.
Ah, that's super annoying; it's buried in a place where there's no way to pass additional information. Looks like ThunarStandardView binds the icon renderer's size to the ThunarThumbnailer's thumbnail-size, and that enum GValue conversion magic converts the pixel size of the icon renderer into a thumbnail size.
I think there's a different way to fix this, though: stop using the "default". It looks like the thumbnailer's thumbnail-size can be overridden on a per-thumbnail-request basis. thunar_thumbnailer_queue_file() and thunar_thumbnailer_queue_files() take a size parameter. ThunarStandardView always passes THUNAR_THUMBNAIL_SIZE_DEFAULT, which causes the thumbnailer to use the value of its thumbnail-size property.
Instead, in ThunarStandardView, where it makes those thumbnailer API calls, you could check the size property of the icon renderer, and then "combine" that with the view's scale-factor property to get a proper-sized thumbnail size. Then explicitly pass that thumbnail size to the thumbnail queuing functions instead of passing _DEFAULT.
I'm not 100% sure the size property on the icon renderer will be valid at all times (might only be valid when the cell renderer is rendering?), so might take a little experimentation to get that right.
But now that thumbnailer size is no longer bound to icon renderer size in standard view it would be easier to implement your solution right ?
The correct required size is passed onto thumbnailer from one of the func inside icon factory. And this call does not use the default option of thumbnailer. So you could now nicely apply your logic ?