Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nemo-file.c: Update hard-coded value for size of thumbnails. #3278

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

marcus125
Copy link
Contributor

Fixes #3268

Why the bug happens

The commit dedd5f8 increased the thumbnail size from 128 to 256px, but a hard-coded value (updated in this PR) wasn't updated.

The hard-coded value is in an if statement that decides if the original file (e.g. an image) should be used instead of the thumbnail, in order to avoid the thumbnail being scaled up too much. At max zoom level, the icon size is 256px, and so the if statement was checking 256 > 128 * 1.25 * scale and then using the original image, which could be very small (as mentioned in the issue).

Alternative solution

Somehow check whether the original file is too small, and if so never replace the thumbnail with it. This would be tricky to implement from my understanding of the code.

Testing

I've manually tested the following on both UI 100% and UI 200%. They are most of the use cases of the code that I changed, and they're all okay/unaffected:

  • compact view
  • icon view
  • list view
  • sidebar in tree mode
  • file conflict dialog
  • file property dialog

Extra things

  • "... Normal thumbnails are up to 128×128 pixels, whereas large thumbnails are up to 256×256 pixels. ..." - gnome thumbnailer.
  • scale in the if statement is 1 if UI Scaling in Display settings is 100%, or 2 if 200%.

This reflects a change in nemo-thumbnails.c,
which now uses GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE
instead of GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL,
and so thumbnails are now 256px, not 128px.

Fixes linuxmint#3268
@mtwebster mtwebster merged commit ae66c5e into linuxmint:master Jul 31, 2023
2 checks passed
@marcus125 marcus125 deleted the fix-thumbnails-bug branch July 31, 2023 17:28
mtwebster pushed a commit that referenced this pull request Aug 20, 2023
This reflects a change in nemo-thumbnails.c,
which now uses GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE
instead of GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL,
and so thumbnails are now 256px, not 128px.

Fixes #3268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Low resolution thumbnails on small SVG files when using maximum zoom level
2 participants