uifw/AvKon/src/aknlongtapanimation.cpp
branchRCL_3
changeset 4 8ca85d2f0db7
parent 0 2f259fa3e83a
child 23 3d340a0166ff
equal deleted inserted replaced
0:2f259fa3e83a 4:8ca85d2f0db7
    40 const TInt KAknLongTapWindowPosition = 11; // window group's priority
    40 const TInt KAknLongTapWindowPosition = 11; // window group's priority
    41 
    41 
    42 /** Window`s Position when hiding the animation which  does not own Window Group */
    42 /** Window`s Position when hiding the animation which  does not own Window Group */
    43 const TInt KAknAnimationNotOwnWindowGroupWindowPosition = -10; // never at front  
    43 const TInt KAknAnimationNotOwnWindowGroupWindowPosition = -10; // never at front  
    44 
    44 
       
    45 /** animation's position offset */
       
    46 const TInt KVerticalOffset = -75;
       
    47 
    45 /**  window group's name */
    48 /**  window group's name */
    46 _LIT( KAknLongTapWgName, "LongTapAnim" ); // window groups name
    49 _LIT( KAknLongTapWgName, "LongTapAnim" ); // window groups name
    47 
    50 
    48 
    51 
    49 // ============================ EXTENSION CLASS ===============================
    52 // ============================ EXTENSION CLASS ===============================
   163     layoutRect.LayoutRect( layoutRect.Rect(),
   166     layoutRect.LayoutRect( layoutRect.Rect(),
   164         AknLayoutScalable_Avkon::cursor_press_pane_g1() );
   167         AknLayoutScalable_Avkon::cursor_press_pane_g1() );
   165     
   168     
   166     SetRect( TRect( TPoint(aX, aY), layoutRect.Rect().Size() ));
   169     SetRect( TRect( TPoint(aX, aY), layoutRect.Rect().Size() ));
   167     
   170     
   168     // Position window so that it will be directly on top of
   171     // position window
   169     // the location that was clicked.
       
   170     TPoint point( aX - Rect().Width() / 2, aY - Rect().Height() / 2 );
   172     TPoint point( aX - Rect().Width() / 2, aY - Rect().Height() / 2 );
       
   173     point.iY += KVerticalOffset;
       
   174     point.iY = Max( 0, point.iY );
       
   175     
   171     Window().SetPosition( point );
   176     Window().SetPosition( point );
   172 
   177 
   173     iAnim->SetSize( layoutRect.Rect().Size() );
   178     iAnim->SetSize( layoutRect.Rect().Size() );
   174     
   179     
   175     iAnim->SetPosition( Rect().iTl );
   180     iAnim->SetPosition( Rect().iTl );