imstutils/imconversationview/imcvuiapp/src/cimcvappsmileicongrid.cpp
branchRCL_3
changeset 18 36d367c62acb
parent 16 d20aea8a18b6
child 19 76f25fb7a6a1
equal deleted inserted replaced
16:d20aea8a18b6 18:36d367c62acb
   548         }
   548         }
   549         
   549         
   550     TInt oldSelection = iCursorPos;
   550     TInt oldSelection = iCursorPos;
   551     TPoint hitPos = aPointerEvent.iPosition;
   551     TPoint hitPos = aPointerEvent.iPosition;
   552     
   552     
   553     // Convert XY position to linear cursor position
   553     // Convert XY position to linear cursor position    
   554     hitPos -= iFirstCell.iTl;
   554     TPoint cellLeftTop( KTopLeft_x,KTopLeft_y );
       
   555     hitPos -= cellLeftTop;
       
   556     
   555     TInt xPos = hitPos.iX / iCellWidth;
   557     TInt xPos = hitPos.iX / iCellWidth;
   556     TInt yPos = hitPos.iY / iCellHeight;
   558     TInt yPos = hitPos.iY / iCellHeight;
   557     TInt newSelection = yPos * iMaxColumns + xPos;
   559     TInt newSelection = yPos * iMaxColumns + xPos;
   558     
   560     
   559     // Check that the selection is inside the grid
   561     // Check that the selection is inside the grid