gnome-desktop r5073 - trunk/libgnome-desktop



Author: vuntz
Date: Mon May  5 15:07:18 2008
New Revision: 5073
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5073&view=rev

Log:
2008-05-05  Vincent Untz  <vuntz gnome org>

	* gnome-bg.c: (get_scaled_pixbuf): simplify
	(pixbuf_blend): do not force the top-left corner of the image to fit in
	the screen, so that zoomed image appears to be zoomed from the center
	of the screen.
	Patch by Jens Granseuer <jensgr gmx net>
	Fix bug #523373


Modified:
   trunk/libgnome-desktop/ChangeLog
   trunk/libgnome-desktop/gnome-bg.c

Modified: trunk/libgnome-desktop/gnome-bg.c
==============================================================================
--- trunk/libgnome-desktop/gnome-bg.c	(original)
+++ trunk/libgnome-desktop/gnome-bg.c	Mon May  5 15:07:18 2008
@@ -310,10 +310,6 @@
 		new = pixbuf_scale_to_min (pixbuf, width, height);
 		break;
 		
-	case GNOME_BG_PLACEMENT_CENTERED:
-		new = g_object_ref (pixbuf);
-		break;
-		
 	case GNOME_BG_PLACEMENT_FILL_SCREEN:
 		new = gdk_pixbuf_scale_simple (pixbuf, width, height,
 					       GDK_INTERP_BILINEAR);
@@ -323,6 +319,7 @@
 		new = pixbuf_scale_to_fit (pixbuf, width, height);
 		break;
 		
+	case GNOME_BG_PLACEMENT_CENTERED:
 	case GNOME_BG_PLACEMENT_TILED:
 	default:
 		new = g_object_ref (pixbuf);
@@ -1489,15 +1486,11 @@
 	if (height < 0)
 		height = gdk_pixbuf_get_height (src);
 	
-	if (dest_x < 0) {
-		offset_x -= dest_x;
+	if (dest_x < 0)
 		dest_x = 0;
-	}
 	
-	if (dest_y < 0) {
-		offset_y -= dest_y;
+	if (dest_y < 0)
 		dest_y = 0;
-	}
 	
 	if (dest_x + width > dest_width) {
 		width = dest_width - dest_x;



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