1 |
eva 09/03/21 13:32:36 |
2 |
|
3 |
Added: nautilus-2.24.2-thumbnail-scaling.patch |
4 |
Log: |
5 |
Bump to 2.24.2-r3. Fix scaling of thumbnails, bug #261219. |
6 |
(Portage version: 2.2_rc25/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 gnome-base/nautilus/files/nautilus-2.24.2-thumbnail-scaling.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.24.2-thumbnail-scaling.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/nautilus/files/nautilus-2.24.2-thumbnail-scaling.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: nautilus-2.24.2-thumbnail-scaling.patch |
15 |
=================================================================== |
16 |
# https://bugs.gentoo.org/show_bug.cgi?id=261219 |
17 |
# https://bugzilla.gnome.org/show_bug.cgi?id=574708 |
18 |
# |
19 |
# Bug 523883 – Thumbnails for 200% zoom are regenerated each time a folder is opened. |
20 |
# |
21 |
# * libnautilus-private/nautilus-file.c: |
22 |
# (nautilus_file_get_icon): |
23 |
# allow scaling up thumbnails, use the scaled up thumnail |
24 |
# for up to 25% size increase. |
25 |
# |
26 |
# * src/file-manager/fm-icon-container.c: |
27 |
# (fm_icon_container_get_icon_images): |
28 |
# Force thumbnail size for compact view to avoid loading at wrong size |
29 |
# and then rescaling |
30 |
# |
31 |
--- a/libnautilus-private/nautilus-file.c 2009/03/16 12:13:10 15121 |
32 |
+++ b/libnautilus-private/nautilus-file.c 2009/03/16 14:18:13 15122 |
33 |
@@ -3579,27 +3579,17 @@ |
34 |
scale = (double)modified_size / s; |
35 |
|
36 |
|
37 |
- if (scale > 0.99) { |
38 |
- /* never scale any thumbnails up */ |
39 |
- scaled_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, |
40 |
- gdk_pixbuf_get_has_alpha (raw_pixbuf), |
41 |
- gdk_pixbuf_get_bits_per_sample (raw_pixbuf), |
42 |
- w * scale, h * scale); |
43 |
- gdk_pixbuf_fill (scaled_pixbuf, 0xffffff00); |
44 |
- gdk_pixbuf_copy_area (raw_pixbuf, |
45 |
- 0, 0, w, h, |
46 |
- scaled_pixbuf, |
47 |
- (gdk_pixbuf_get_width (scaled_pixbuf) - w) / 2, |
48 |
- (gdk_pixbuf_get_height (scaled_pixbuf) - h) / 2); |
49 |
- } else { |
50 |
- scaled_pixbuf = gdk_pixbuf_scale_simple (raw_pixbuf, |
51 |
- w * scale, h * scale, |
52 |
- GDK_INTERP_BILINEAR); |
53 |
- } |
54 |
+ scaled_pixbuf = gdk_pixbuf_scale_simple (raw_pixbuf, |
55 |
+ w * scale, h * scale, |
56 |
+ GDK_INTERP_BILINEAR); |
57 |
nautilus_thumbnail_frame_image (&scaled_pixbuf); |
58 |
g_object_unref (raw_pixbuf); |
59 |
|
60 |
- if (modified_size > 128 && |
61 |
+ /* Don't scale up if more than 25%, then read the original |
62 |
+ image instead. We don't want to compare to exactly 100%, |
63 |
+ since the zoom level 150% gives thumbnails at 144, which is |
64 |
+ ok to scale up from 128. */ |
65 |
+ if (modified_size > 128*1.25 && |
66 |
!file->details->thumbnail_wants_original) { |
67 |
/* Invalidate if we resize upward */ |
68 |
file->details->thumbnail_wants_original = TRUE; |
69 |
--- a/src/file-manager/fm-icon-container.c 2009/03/16 12:13:10 15121 |
70 |
+++ b/src/file-manager/fm-icon-container.c 2009/03/16 14:18:13 15122 |
71 |
@@ -99,6 +99,9 @@ |
72 |
if (!fm_icon_view_is_compact (icon_view) || |
73 |
nautilus_icon_container_get_zoom_level (container) > NAUTILUS_ZOOM_LEVEL_STANDARD) { |
74 |
flags |= NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS; |
75 |
+ if (fm_icon_view_is_compact (icon_view)) { |
76 |
+ flags |= NAUTILUS_FILE_ICON_FLAGS_FORCE_THUMBNAIL_SIZE; |
77 |
+ } |
78 |
} |
79 |
|
80 |
if (use_embedding) { |