diff options
author | António Fernandes <antoniof@gnome.org> | 2022-12-15 12:14:37 +0000 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-12-24 12:44:25 +0000 |
commit | dd5e1c82a308fb5df9846bdd8dfe56e7d001b111 (patch) | |
tree | 19f9776744b099017051e1ea8ad39f807ea12d71 /src/nautilus-file.c | |
parent | 6e0b3d946d010fb351126174c628a8ede05bae95 (diff) | |
download | nautilus-dd5e1c82a308fb5df9846bdd8dfe56e7d001b111.tar.gz |
file: Check minimum thumbnail size independently from scale
We've been allowing thumbnails at smaller sizes if the screen density
is larger. This goes back to 7059cc66ca3bc338e49a6ac4cb37c3484ba3b19d
This leads to inconsistent results depending on the screen density.
Also, the human eye is the limiting factor here.
So, replace the helper function with a simple size check.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1804
Diffstat (limited to 'src/nautilus-file.c')
-rw-r--r-- | src/nautilus-file.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c index ab5074802..2999f2fa5 100644 --- a/src/nautilus-file.c +++ b/src/nautilus-file.c @@ -5153,22 +5153,6 @@ nautilus_file_get_thumbnail_icon (NautilusFile *file, return icon; } -static gboolean -nautilus_thumbnail_is_limited_by_zoom (int size, - int scale) -{ - int zoom_level; - - zoom_level = size * scale; - - if (zoom_level < NAUTILUS_THUMBNAIL_MINIMUM_ICON_SIZE) - { - return TRUE; - } - - return FALSE; -} - NautilusIconInfo * nautilus_file_get_icon (NautilusFile *file, int size, @@ -5198,7 +5182,7 @@ nautilus_file_get_icon (NautilusFile *file, if (flags & NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS && nautilus_file_should_show_thumbnail (file) && - !nautilus_thumbnail_is_limited_by_zoom (size, scale)) + size >= NAUTILUS_THUMBNAIL_MINIMUM_ICON_SIZE) { icon = nautilus_file_get_thumbnail_icon (file, size, scale, flags); } |