mulwidgets/gesturehelper/src/gesture.cpp
branchRCL_3
changeset 17 514d98f21c43
parent 0 e83bab7cf002
--- a/mulwidgets/gesturehelper/src/gesture.cpp	Tue May 25 13:16:14 2010 +0300
+++ b/mulwidgets/gesturehelper/src/gesture.cpp	Mon Jun 21 16:15:51 2010 +0300
@@ -909,7 +909,8 @@
 //
 TInt CGesture::PinchPercent() const
     {
-    return (iPinchEndDistance*100/iPinchStartDistance);
+	// Added 0.5 to avoid 5.7 getting rounded off to 5.
+    return (iPinchEndDistance*100/iPinchStartDistance) + 0.5;	
     }
 
 // ----------------------------------------------------------------------------
@@ -922,9 +923,7 @@
         {
         return TPoint(0,0);
         }
-    TInt greaterX = iPoints[0].iPos.iX > iSecondaryPoints[0].iPos.iX ? iPoints[0].iPos.iX : iSecondaryPoints[0].iPos.iX;
-    TInt greaterY = iPoints[0].iPos.iY > iSecondaryPoints[0].iPos.iY ? iPoints[0].iPos.iY : iSecondaryPoints[0].iPos.iY; 
-    return TPoint( (Abs(iPoints[0].iPos.iX - iSecondaryPoints[0].iPos.iX)/2 + greaterX), (Abs(iPoints[0].iPos.iY - iSecondaryPoints[0].iPos.iY)/2 + greaterY));
+    return TPoint( (iPoints[0].iPos.iX + iSecondaryPoints[0].iPos.iX)/2, (iPoints[0].iPos.iY + iSecondaryPoints[0].iPos.iY)/2);
     }
 
 // end of file