uifw/ganes/src/HgScroller.cpp
changeset 14 3320e4e6e8bb
parent 0 2f259fa3e83a
--- a/uifw/ganes/src/HgScroller.cpp	Tue Feb 02 01:00:49 2010 +0200
+++ b/uifw/ganes/src/HgScroller.cpp	Fri Apr 16 15:13:44 2010 +0300
@@ -407,18 +407,8 @@
         {
         iPhysics = CAknPhysics::NewL(*this, this);
         }
-
-    // For to be able to pan on a empty area. 
-    // The world is set to be at least the size of the view.
-    TSize worldSize = TotalSize();
     
-    if( !iLandscapeScrolling && (worldSize.iHeight < iHeight) )
-        worldSize.iHeight = iHeight;
-    
-    if( iLandscapeScrolling && (worldSize.iWidth < iWidth) )
-        worldSize.iWidth = iWidth;
-
-    iPhysics->InitPhysicsL( worldSize, 
+    iPhysics->InitPhysicsL( TotalSize(), 
             TSize(iWidth, iHeight), 
             iLandscapeScrolling);
     }
@@ -564,10 +554,7 @@
             iPointerDown = ETrue;
             HandleDownEventL( aEvent );
 
-            if( iDetector 
-                    && iSelectedIndex != KErrNotFound 
-                    && !HasHighlight() 
-                    && iActionMenu->InitMenuL() )
+            if( iDetector && !HasHighlight() && iActionMenu->InitMenuL() )
                 iDetector->PointerEventL( aEvent );
             }
         // Drag
@@ -608,7 +595,7 @@
                 {
                 if ( feedback )
                     {
-                    feedback->InstantFeedback( this, ETouchFeedbackSlider, aEvent );
+                    feedback->InstantFeedback( this, ETouchFeedbackBasicSlider, aEvent );
                     }
                 }
             // Drag
@@ -637,7 +624,7 @@
                     {
                     feedback->StopFeedback( this );
                     TTouchFeedbackType type = ETouchFeedbackVibra;
-                    feedback->InstantFeedback( this, ETouchFeedbackSlider, type, aEvent );
+                    feedback->InstantFeedback( this, ETouchFeedbackBasicSlider, type, aEvent );
                     }
                 iPopupText1.Zero();
                 iPopupText2.Zero();
@@ -690,9 +677,9 @@
         SetHighlightL();
         }
     MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if ( feedback && iSelectedIndex != KErrNotFound )
+    if ( feedback )
         {
-        feedback->InstantFeedback( this, ETouchFeedbackList, aEvent );
+        feedback->InstantFeedback( this, ETouchFeedbackBasicItem, aEvent );
         }
     }
 
@@ -744,17 +731,17 @@
         if(iLandscapeScrolling && AknLayoutUtils::LayoutMirrored())
             drag = -drag;
         iPhysics->StartPhysics(drag, iStartTime);
-        if ( feedback && iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking )
+        if ( feedback )
             {
-            feedback->InstantFeedback( this, ETouchFeedbackFlick, type, aEvent );
+            feedback->InstantFeedback( this, ETouchFeedbackItemScroll, type, aEvent );
             }
         }
     else
         {
         HandleSelectionL();
-        if ( feedback && iSelectedIndex != KErrNotFound )
+        if ( feedback )
             {
-            feedback->InstantFeedback( this, ETouchFeedbackList, type, aEvent );
+            feedback->InstantFeedback( this, ETouchFeedbackBasicItem, type, aEvent );
             }
         }
     }
@@ -1479,14 +1466,12 @@
     iHighlightTimer->Cancel();
 
     TInt index = GetSelected(iStart);
-    if((index != KErrNotFound || !HasHighlight())
-            && iPointerDown )
+    if(index != KErrNotFound && iPointerDown )
         {
         iSelectionToFocusedItem = index == iSelectedIndex;            
         iSelectedIndex = index;
         iFocusedIndex = index;
-        // Selection has changed to valid item
-        if( !iSelectionToFocusedItem && iSelectedIndex != KErrNotFound ) 
+        if( !iSelectionToFocusedItem ) // Selection has changed
             {
             if( iSelectionObserver )
                 iSelectionObserver->HandleSelectL(iSelectedIndex);