[f-spot: 20/41] drop the ScrollTo, it's handled by the Layout



commit d1346868e042d4475b4fd49e17f6dfa6ed2ff769
Author: Stephane Delcroix <stephane delcroix org>
Date:   Tue Jun 9 17:45:00 2009 +0200

    drop the ScrollTo, it's handled by the Layout

 src/Widgets/ImageView.cs |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index 310920d..c2a4326 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -361,23 +361,14 @@ namespace FSpot.Widgets
 			return base.OnButtonPressEvent (evnt);
 		}
 
-		private void ScrollTo ()
-		{
-		}
 		protected override bool OnScrollEvent (EventScroll evnt)
 		{
-			int x_incr = (int) Hadjustment.PageIncrement / 2;
-			int y_incr = (int) Vadjustment.PageIncrement / 2;
-			
-			if ((evnt.State & ModifierType.ShiftMask) == 0) //no shift, let's zoom
+			if ((evnt.State & ModifierType.ShiftMask) == 0) {//no shift, let's zoom
 				ZoomAboutPoint ((evnt.Direction == ScrollDirection.Up || evnt.Direction == ScrollDirection.Right) ? ZOOM_FACTOR : 1.0 / ZOOM_FACTOR,
 						 (int)evnt.X, (int)evnt.Y);
-			else if ((evnt.State & ModifierType.ControlMask) == 0)
-				ScrollTo ();
-			else
-				ScrollTo ();
-
-			return false;
+				return true;
+			}
+			return base.OnScrollEvent (evnt);
 		}
 
 		void UpdateScaledSize ()



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