meetingrequest/mrgui/mrfieldbuilderplugin/src/cmrattachmentsfield.cpp
branchRCL_3
changeset 18 6b8f3b30d0ec
parent 16 b5fbb9b25d57
equal deleted inserted replaced
17:67369d1b217f 18:6b8f3b30d0ec
   314         }
   314         }
   315 
   315 
   316     // Layout field title
   316     // Layout field title
   317     if( iTitle )
   317     if( iTitle )
   318         {
   318         {
   319         TAknLayoutText labelLayout(
   319         TAknTextComponentLayout labelLayout =
   320                 NMRLayoutManager::GetLayoutText(
   320                 NMRLayoutManager::GetTextComponentLayout(
   321                         firstRowRect,
   321                         NMRLayoutManager::EMRTextLayoutTextEditor );
   322                             NMRLayoutManager::EMRTextLayoutTextEditor ) );
   322         AknLayoutUtils::LayoutLabel( iTitle, firstRowRect, labelLayout );
   323 
       
   324         iTitle->SetRect( labelLayout.TextRect() );
       
   325 
       
   326         // Setting font also for the label. Failures are ignored.
       
   327         TRAP_IGNORE( iTitle->SetFont( labelLayout.Font() ) );
       
   328         }
   323         }
   329 
   324 
   330     TRect edwinRect( 0, 0, 0, 0 );
   325     TRect edwinRect( 0, 0, 0, 0 );
   331 
   326 
   332     // Layout field editor
   327     // Layout field editor
   499         ASSERT( currentLink );
   494         ASSERT( currentLink );
   500 
   495 
   501         iAttCommandHandler->HandleAttachmentCommandL(
   496         iAttCommandHandler->HandleAttachmentCommandL(
   502                 aCommand,
   497                 aCommand,
   503                 *currentLink );
   498                 *currentLink );
   504         
   499 
   505 		HandleTactileFeedbackL();
   500 		HandleTactileFeedbackL();
   506 
   501 
   507         handled = ETrue;
   502         handled = ETrue;
   508 
   503 
   509         if( aCommand == EESMREditorRemoveAttachment ||
   504         if( aCommand == EESMREditorRemoveAttachment ||
   843     if( iAttachmentCount == 0 )
   838     if( iAttachmentCount == 0 )
   844         {
   839         {
   845         if( Rect().Contains( aPosition ) )
   840         if( Rect().Contains( aPosition ) )
   846             {
   841             {
   847 			HandleTactileFeedbackL();
   842 			HandleTactileFeedbackL();
   848 			
   843 
   849             ret = AddAttachmentL();
   844             ret = AddAttachmentL();
   850             }
   845             }
   851         }
   846         }
   852     // Otherwise only the title and the fieldIcon will
   847     // Otherwise only the title and the fieldIcon will
   853     // execute the single tap action
   848     // execute the single tap action
   855         {
   850         {
   856         if( iTitle->Rect().Contains( aPosition ) ||
   851         if( iTitle->Rect().Contains( aPosition ) ||
   857                 iFieldIcon->Rect().Contains( aPosition ) )
   852                 iFieldIcon->Rect().Contains( aPosition ) )
   858             {
   853             {
   859 			HandleTactileFeedbackL();
   854 			HandleTactileFeedbackL();
   860 			
   855 
   861 			ret = AddAttachmentL();
   856 			ret = AddAttachmentL();
   862             }
   857             }
   863         }
   858         }
   864 
   859 
   865     return ret;
   860     return ret;