Skip to content

Commit 47246e2

Browse files
cosimoclukefromdc
authored andcommitted
file: support HiDpi for thumbnails images
This was missing from the last commit. origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/b3b4bea5
1 parent c0d60fc commit 47246e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcaja-private/caja-file.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -4322,9 +4322,9 @@ caja_file_get_icon (CajaFile *file,
43224322
}
43234323

43244324
if (flags & CAJA_FILE_ICON_FLAGS_FORCE_THUMBNAIL_SIZE) {
4325-
modified_size = size;
4325+
modified_size = size * scale;
43264326
} else {
4327-
modified_size = size * cached_thumbnail_size / CAJA_ICON_SIZE_STANDARD;
4327+
modified_size = size * scale * cached_thumbnail_size / CAJA_ICON_SIZE_STANDARD;
43284328
}
43294329
if (flags & CAJA_FILE_ICON_FLAGS_USE_THUMBNAILS &&
43304330
caja_file_should_show_thumbnail (file)) {
@@ -4370,7 +4370,7 @@ caja_file_get_icon (CajaFile *file,
43704370
image instead. We don't want to compare to exactly 100%,
43714371
since the zoom level 150% gives thumbnails at 144, which is
43724372
ok to scale up from 128. */
4373-
if (modified_size > 128*1.25 &&
4373+
if (modified_size > 128 * 1.25 * scale &&
43744374
!file->details->thumbnail_wants_original &&
43754375
caja_can_thumbnail_internally (file)) {
43764376
/* Invalidate if we resize upward */

0 commit comments

Comments
 (0)