summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-02-23 17:12:55 -0500
committerVictor Kareh <[email protected]>2026-02-23 17:23:45 -0500
commit6fe9069bcd93d420803f92c73a1be1d8a4465884 (patch)
treeac2a3c8610db5415676afb6a47b33a34fbe62a7c
parenta785f83ce8b2727f046fe8142edc850ce905f77a (diff)
downloadcaja-thumbnail-resizes.tar.bz2
caja-thumbnail-resizes.tar.xz
caja-file: fix thumbnails shrinking when loaded on selectthumbnail-resizes
Small images were loading thumbnails at their native pixel dimensions after being selected, instead of being scaled to the icon view's display size. This means that when clicking or selecting those images, they visually shrunk. Fixes #1871
-rw-r--r--libcaja-private/caja-file.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 2fc9c030..c2a463a6 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -4611,13 +4611,8 @@ caja_file_get_icon (CajaFile *file,
h = gdk_pixbuf_get_height (raw_pixbuf);
s = MAX (w, h);
- /* Don't scale up small thumbnails in the standard view */
- if (s <= cached_thumbnail_size) {
- thumb_scale = (double)size / CAJA_ICON_SIZE_STANDARD;
- }
- else {
- thumb_scale = (double)modified_size / s;
- }
+ /* Scale all thumbnails to the target display size */
+ thumb_scale = (double)modified_size / s;
/* Make sure that icons don't get smaller than CAJA_ICON_SIZE_SMALLEST */
if (s*thumb_scale <= CAJA_ICON_SIZE_SMALLEST) {
thumb_scale = (double) CAJA_ICON_SIZE_SMALLEST / s;