mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
Fix frame size calculation.
2008-05-22 Christian Neumair <cneumair@gnome.org> * libnautilus-private/nautilus-file.c (nautilus_file_get_icon): Fix frame size calculation. svn path=/trunk/; revision=14185
This commit is contained in:
parent
aaf37c6184
commit
4a50f8ec49
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-05-22 Christian Neumair <cneumair@gnome.org>
|
||||
|
||||
* libnautilus-private/nautilus-file.c (nautilus_file_get_icon):
|
||||
Fix frame size calculation.
|
||||
|
||||
2008-05-22 Christian Neumair <cneumair@gnome.org>
|
||||
|
||||
* src/nautilus-main.c (main):
|
||||
|
|
|
@ -3392,14 +3392,14 @@ nautilus_file_get_icon (NautilusFile *file,
|
|||
w = gdk_pixbuf_get_width (raw_pixbuf);
|
||||
h = gdk_pixbuf_get_height (raw_pixbuf);
|
||||
|
||||
/* These compensates for frame size which will be added on the raw image */
|
||||
s = MAX (NAUTILUS_THUMBNAIL_FRAME_LEFT + w + NAUTILUS_THUMBNAIL_FRAME_RIGHT,
|
||||
NAUTILUS_THUMBNAIL_FRAME_TOP + h + NAUTILUS_THUMBNAIL_FRAME_BOTTOM);
|
||||
s = MAX (w, h);
|
||||
|
||||
scale = (double)modified_size / s;
|
||||
|
||||
/* These compensate for the size of the frame which will be added around the raw image */
|
||||
scaled_pixbuf = gdk_pixbuf_scale_simple (raw_pixbuf,
|
||||
w * scale, h * scale,
|
||||
NAUTILUS_THUMBNAIL_FRAME_LEFT + w * scale + NAUTILUS_THUMBNAIL_FRAME_RIGHT,
|
||||
NAUTILUS_THUMBNAIL_FRAME_TOP + h * scale + NAUTILUS_THUMBNAIL_FRAME_BOTTOM,
|
||||
GDK_INTERP_BILINEAR);
|
||||
nautilus_thumbnail_frame_image (&scaled_pixbuf);
|
||||
|
||||
|
|
Loading…
Reference in a new issue