photosgallery/viewframework/views/zoomview/src/glxzoomeventhandler.cpp
branchRCL_3
changeset 19 420f6808bf21
parent 18 78ad99c24f08
child 21 f9e827349359
equal deleted inserted replaced
18:78ad99c24f08 19:420f6808bf21
    49 const TInt KGlxAnimeFrameInmS           = 10000     ;
    49 const TInt KGlxAnimeFrameInmS           = 10000     ;
    50 const TInt KGlxAnimeFrameCount          = 10        ;                 
    50 const TInt KGlxAnimeFrameCount          = 10        ;                 
    51 
    51 
    52 const TInt KGlxPanInertiaFrameInmS      = 20000     ;
    52 const TInt KGlxPanInertiaFrameInmS      = 20000     ;
    53 
    53 
       
    54 //Zoom Factor to keep the relative Zoom Ratio 
       
    55 //same while changing orientation.
       
    56 const TInt KGlxNeutralZoomFactor = 100;
       
    57 
    54 using namespace GestureHelper;
    58 using namespace GestureHelper;
    55 
    59 
    56 // ============================ CGlxZoomPanEventHandler===============================
    60 // ============================ CGlxZoomPanEventHandler===============================
    57 // ============================ MEMBER FUNCTIONS ===============================
    61 // ============================ MEMBER FUNCTIONS ===============================
    58 
    62 
   840 void CGlxZoomPanEventHandler::OrientationChanged(const TRect& aNewScreenRect)
   844 void CGlxZoomPanEventHandler::OrientationChanged(const TRect& aNewScreenRect)
   841     {
   845     {
   842     TRACER("CGlxZoomPanEventHandler::OrientationChanged ");
   846     TRACER("CGlxZoomPanEventHandler::OrientationChanged ");
   843     
   847     
   844     iMathsEngine.OrientationChanged(aNewScreenRect);
   848     iMathsEngine.OrientationChanged(aNewScreenRect);
   845     iMinZoomRatio = iMathsEngine.MinimumZoomRatio(); 
   849     iMinZoomRatio = iMathsEngine.MinimumZoomRatio();
   846     Zoom(0, 0, iZoomMode) ;
   850     //Keep the relative Zoom Ratio same while changing orientation
       
   851     Zoom(0, KGlxNeutralZoomFactor, iZoomMode) ;
   847     }
   852     }
   848 
   853 
   849 // -----------------------------------------------------------------------------
   854 // -----------------------------------------------------------------------------
   850 // ShowSlider
   855 // ShowSlider
   851 // -----------------------------------------------------------------------------
   856 // -----------------------------------------------------------------------------