f-spot r3799 - trunk/src/Widgets



Author: sdelcroix
Date: Sat Mar 29 14:02:13 2008
New Revision: 3799
URL: http://svn.gnome.org/viewvc/f-spot?rev=3799&view=rev

Log:
another change on the filmstrip

Modified:
   trunk/src/Widgets/Filmstrip.cs

Modified: trunk/src/Widgets/Filmstrip.cs
==============================================================================
--- trunk/src/Widgets/Filmstrip.cs	(original)
+++ trunk/src/Widgets/Filmstrip.cs	Sat Mar 29 14:02:13 2008
@@ -606,20 +606,21 @@
 
 			bool Step ()
 			{
-				float halfway_distance = 0.5f * speed * speed / acc;
+				float dv = acc * interval / 1000f;
+				float halfway_distance = 0.5f * (speed + dv) * (speed + dv) / acc;
 				float distance = Math.Abs (filmstrip.Position - target);
 
 				if (Math.Abs (speed) > 30 && distance > halfway_distance) { //HYPERSPACE JUMP
 					handler (target + (float)Math.Sign (filmstrip.Position - target) * halfway_distance);
-					speed -= acc * interval / 1000f;
+					speed -= dv;
 					return true;
 				}
 
 				if ( distance <= halfway_distance )	//SLOW DOWN!
-					speed -= acc * interval / 1000f;
+					speed -= dv;
 
 				else	//SPEED UP
-					speed += acc * interval / 1000f;
+					speed += dv;
 
 				float increment = speed * interval / 1000f;
 



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