nemo-file.c: Update hard-coded value for size of thumbnails. #3278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Extra things
scale
in the if statement is 1 if UI Scaling in Display settings is 100%, or 2 if 200%.