Commit 4a50f8ec authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

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
parent aaf37c61
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment