meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrresponsefield.cpp
branchRCL_3
changeset 18 6b8f3b30d0ec
parent 16 b5fbb9b25d57
child 22 d620048b4810
equal deleted inserted replaced
17:67369d1b217f 18:6b8f3b30d0ec
   155         // Move the row down then it will be drawn to correct position.
   155         // Move the row down then it will be drawn to correct position.
   156         // controlIndex+1 tells the fields index.
   156         // controlIndex+1 tells the fields index.
   157         TInt movement = choiceLayoutRect.Rect().Height();
   157         TInt movement = choiceLayoutRect.Rect().Height();
   158         rect.Move( 0, movement * ( i - 1 ) );
   158         rect.Move( 0, movement * ( i - 1 ) );
   159 
   159 
       
   160         TInt leftMargin = choiceLayoutRect.Rect().iTl.iX;
       
   161         TInt rightMargin = choiceLayoutRect.Rect().iBr.iX;
       
   162         if ( AknLayoutUtils::LayoutMirrored() )
       
   163             {
       
   164             leftMargin -= parentRect.iTl.iX;
       
   165             rightMargin -= parentRect.iTl.iX;
       
   166             }
       
   167 
   160         AknLayoutUtils::LayoutControl(
   168         AknLayoutUtils::LayoutControl(
   161                 ControlItem( i - 1 ),
   169                 ControlItem( i - 1 ),
   162                 rect,
   170                 rect,
   163                 choiceLayoutRect.Color().Value(),
   171                 choiceLayoutRect.Color().Value(),
   164                 choiceLayoutRect.Rect().iTl.iX,
   172                 leftMargin,
   165                 0,
   173                 0,
   166                 choiceLayoutRect.Rect().iBr.iX,
   174                 rightMargin,
   167                 choiceLayoutRect.Rect().iBr.iY,
   175                 choiceLayoutRect.Rect().iBr.iY,
   168                 choiceLayoutRect.Rect().Width(),
   176                 choiceLayoutRect.Rect().Width(),
   169                 choiceLayoutRect.Rect().Height() );
   177                 choiceLayoutRect.Rect().Height() );
   170         }
   178         }
   171     }
   179     }
   523 //
   531 //
   524 TBool CESMRResponseField::ExecuteGenericCommandL( TInt aCommand )
   532 TBool CESMRResponseField::ExecuteGenericCommandL( TInt aCommand )
   525     {
   533     {
   526     FUNC_LOG;
   534     FUNC_LOG;
   527     TBool isUsed( EFalse );
   535     TBool isUsed( EFalse );
   528     if ( aCommand == EAknSoftkeySelect )
   536 
   529         {
   537     switch ( aCommand )
   530         ItemSelectedL();
   538         {
   531         isUsed = ETrue;
   539         case EAknSoftkeySelect:
   532         }
   540         case EAknCmdOpen:
   533     else
   541             {
   534         {
   542             ItemSelectedL();
   535         isUsed = CESMRField::ExecuteGenericCommandL( aCommand );
   543             isUsed = ETrue;
       
   544             break;
       
   545             }
       
   546         default:
       
   547             {
       
   548             isUsed = CESMRField::ExecuteGenericCommandL( aCommand );
       
   549             break;
       
   550             }
   536         }
   551         }
   537 
   552 
   538     return isUsed;
   553     return isUsed;
   539     }
   554     }
   540 
   555