summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-02-23 17:12:55 -0500
committerVictor Kareh <[email protected]>2026-03-06 07:57:04 -0500
commitf264171de8a195fcfa5315948fea584c4810a063 (patch)
tree233ee197b2fdf436bafb027eec6f5fbbf80d2338
parent60c21662134af809cb2f20ddf7f4534024453733 (diff)
downloadcaja-f264171de8a195fcfa5315948fea584c4810a063.tar.bz2
caja-f264171de8a195fcfa5315948fea584c4810a063.tar.xz
caja-file: fix thumbnails shrinking when loaded on selectHEADmaster
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;