phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardheadercontrol.cpp
branchRCL_3
changeset 5 81f8547efd4f
parent 3 04ab22b956c2
child 8 5586b4d2ec3e
equal deleted inserted replaced
3:04ab22b956c2 5:81f8547efd4f
    36 #include "ccappstatuscontrol.h"
    36 #include "ccappstatuscontrol.h"
    37 #include <phonebook2ece.mbg>
    37 #include <phonebook2ece.mbg>
    38 #include <gulicon.h>
    38 #include <gulicon.h>
    39 #include <layoutmetadata.cdl.h>
    39 #include <layoutmetadata.cdl.h>
    40 #include <StringLoader.h>
    40 #include <StringLoader.h>
       
    41 #include <AknsUtils.h>
    41 
    42 
    42 namespace {
    43 namespace {
    43 /// Amount of child UI components
    44 /// Amount of child UI components
    44 const TInt KControlCount = 4;
    45 const TInt KControlCount = 4;
    45 _LIT( KMyCardIconDefaultFileName, "\\resource\\apps\\phonebook2ece.mif" );
    46 _LIT( KMyCardIconDefaultFileName, "\\resource\\apps\\phonebook2ece.mif" );
   233     imageLayoutRect.LayoutRect( rect, imageLayout.LayoutLine() );
   234     imageLayoutRect.LayoutRect( rect, imageLayout.LayoutLine() );
   234     TRect imageRect( imageLayoutRect.Rect() );
   235     TRect imageRect( imageLayoutRect.Rect() );
   235     
   236     
   236     iPortraitImage->SetRect( imageRect );
   237     iPortraitImage->SetRect( imageRect );
   237     iPortraitImageSize = imageRect.Size();
   238     iPortraitImageSize = imageRect.Size();
   238    
   239 
       
   240     
   239     // label 1
   241     // label 1
   240     AknLayoutUtils::LayoutLabel( 
   242     AknLayoutUtils::LayoutLabel( 
   241             iLabel1, 
   243             iLabel1, 
   242             rect, 
   244             rect, 
   243             AknLayoutScalable_Apps::phob2_cc_data_pane_t1( option ) );
   245             AknLayoutScalable_Apps::phob2_cc_data_pane_t1( option ) );
   244 
   246     
   245     // label 2
   247     // label 2
   246     AknLayoutUtils::LayoutLabel( 
   248     AknLayoutUtils::LayoutLabel( 
   247             iLabel2, 
   249             iLabel2, 
   248             rect, 
   250             rect, 
   249             AknLayoutScalable_Apps::phob2_cc_data_pane_t2( option ) );
   251             AknLayoutScalable_Apps::phob2_cc_data_pane_t2( option ) );
       
   252 
       
   253     TRgb color;
       
   254     AknsUtils::GetCachedColor( 
       
   255             AknsUtils::SkinInstance(), 
       
   256             color, 
       
   257             KAknsIIDQsnTextColors, 
       
   258             EAknsCIQsnTextColorsCG6 );
       
   259     
       
   260     TRAP_IGNORE(
       
   261         {
       
   262         iLabel1->OverrideColorL( EColorLabelText, color );        
       
   263         iLabel2->OverrideColorL( EColorLabelText, color );
       
   264         } );
       
   265     
   250     
   266     
   251     // resize images for new resolution
   267     // resize images for new resolution
   252     if( iPortraitBitmap ) 
   268     if( iPortraitBitmap ) 
   253         {
   269         {
   254         AknIconUtils::SetSize( iPortraitBitmap, 
   270         AknIconUtils::SetSize( iPortraitBitmap,