f-spot r3664 - trunk/src/Widgets



Author: sdelcroix
Date: Mon Feb 11 15:06:15 2008
New Revision: 3664
URL: http://svn.gnome.org/viewvc/f-spot?rev=3664&view=rev

Log:
fixing rendering bug

Modified:
   trunk/src/Widgets/IconView.cs

Modified: trunk/src/Widgets/IconView.cs
==============================================================================
--- trunk/src/Widgets/IconView.cs	(original)
+++ trunk/src/Widgets/IconView.cs	Mon Feb 11 15:06:15 2008
@@ -804,6 +804,7 @@
 			if (entry != null)
 				thumbnail = entry.ShallowCopyPixbuf ();
 
+			Gdk.Rectangle draw = Gdk.Rectangle.Zero;
 			if (Gdk.Rectangle.Inflate (image_bounds, expansion + 1, expansion + 1).Intersect (area, out image_bounds) && thumbnail != null) {
 
 				PixbufUtils.Fit (thumbnail, ThumbnailWidth, ThumbnailHeight,
@@ -853,7 +854,7 @@
 				region.Width = temp_thumbnail.Width;
 				region.Height = temp_thumbnail.Height;
 
-				Gdk.Rectangle draw = Gdk.Rectangle.Inflate (region, 1, 1);
+				draw = Gdk.Rectangle.Inflate (region, 1, 1);
 
 				if (!temp_thumbnail.HasAlpha)
 					Style.PaintShadow (Style, BinWindow, cell_state,
@@ -881,15 +882,14 @@
 			if (thumbnail != null) {
 				thumbnail.Dispose ();
 			}
-			Gdk.Rectangle layout_bounds = Gdk.Rectangle.Zero;
-			if (DisplayRatings) {
+			if (DisplayRatings && photo.Rating > 0 && region.X == draw.X && region.X != 0) {
 				FSpot.Widgets.RatingSmall rating;
 				rating = new FSpot.Widgets.RatingSmall ((int) photo.Rating, false);
-				if (region.Intersect (area, out region))
-					rating.DisplayPixbuf.RenderToDrawable (BinWindow, Style.WhiteGC,
-						0, 0, region.X, region.Y, -1, -1, RgbDither.None, region.X, region.Y);
+				rating.DisplayPixbuf.RenderToDrawable (BinWindow, Style.WhiteGC,
+						0, 0, region.X, region.Y, -1, -1, RgbDither.None, 0, 0);
 				
 			}
+			Gdk.Rectangle layout_bounds = Gdk.Rectangle.Zero;
 			if (DisplayDates) {
 				string date;
 				if (cell_width > 200) {



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