nautilus r14184 - in branches/gnome-2-22: . libnautilus-private



Author: cneumair
Date: Thu May 22 17:36:14 2008
New Revision: 14184
URL: http://svn.gnome.org/viewvc/nautilus?rev=14184&view=rev

Log:
2008-05-22  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-file.c (nautilus_file_get_icon):
	Fix frame size calculation.


Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/libnautilus-private/nautilus-file.c

Modified: branches/gnome-2-22/libnautilus-private/nautilus-file.c
==============================================================================
--- branches/gnome-2-22/libnautilus-private/nautilus-file.c	(original)
+++ branches/gnome-2-22/libnautilus-private/nautilus-file.c	Thu May 22 17:36:14 2008
@@ -3365,14 +3365,14 @@
 				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);
 				



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]