f-spot r3783 - in trunk: . src/Widgets
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r3783 - in trunk: . src/Widgets
- Date: Tue, 25 Mar 2008 10:44:36 +0000 (GMT)
Author: sdelcroix
Date: Tue Mar 25 10:44:36 2008
New Revision: 3783
URL: http://svn.gnome.org/viewvc/f-spot?rev=3783&view=rev
Log:
2008-03-25 Roland Mas <lolando debian org>
* src/Widgets/Filmstrip.cs: Added hyperspace jump to the
AcceleratedAnimator.
Modified:
trunk/ChangeLog
trunk/src/Widgets/Filmstrip.cs
Modified: trunk/src/Widgets/Filmstrip.cs
==============================================================================
--- trunk/src/Widgets/Filmstrip.cs (original)
+++ trunk/src/Widgets/Filmstrip.cs Tue Mar 25 10:44:36 2008
@@ -600,8 +600,16 @@
bool Step ()
{
+ float halfway_distance = 0.5f * speed * speed / acc;
float distance = Math.Abs (filmstrip.Position - target);
- if ( distance < speed * speed / acc ) //SLOW DOWN!
+
+ if (Math.Abs (speed) > 30 && distance > halfway_distance) { //HYPERSPACE JUMP
+ handler (target + (float)Math.Sign (filmstrip.Position - target) * halfway_distance);
+ speed -= acc * interval / 1000f;
+ return true;
+ }
+
+ if ( distance <= halfway_distance ) //SLOW DOWN!
speed -= acc * interval / 1000f;
else //SPEED UP
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]