phoneuis/BubbleManager/Src/BMTouchPaneButton.cpp
branchRCL_3
changeset 58 40a3f856b14d
parent 19 544e34b3255a
equal deleted inserted replaced
57:94dc1107e8b2 58:40a3f856b14d
    26 
    26 
    27 #include "BMTouchPaneButton.h"
    27 #include "BMTouchPaneButton.h"
    28 #include "BMTouchPaneInterface.h"
    28 #include "BMTouchPaneInterface.h"
    29 #include "BMPanic.h"
    29 #include "BMPanic.h"
    30 
    30 
    31 
    31 const TInt KDimmedTransparency = 77;
    32 const TInt KBubbleButtonText = 255;
    32 const TInt KBubbleButtonText = 255;
    33 
    33 
    34 // ======== MEMBER FUNCTIONS ========
    34 // ======== MEMBER FUNCTIONS ========
    35 
    35 
    36 // ---------------------------------------------------------------------------
    36 // ---------------------------------------------------------------------------
   236 
   236 
   237     TInt commandCount = iCommands.Count();
   237     TInt commandCount = iCommands.Count();
   238     
   238     
   239     for ( TInt i=0; i < commandCount; i++ )    
   239     for ( TInt i=0; i < commandCount; i++ )    
   240         {
   240         {
   241         frameId = iIconProvider->GetButtonForCommandL( 
   241         TRAP_IGNORE( frameId = iIconProvider->GetButtonForCommandL( 
   242                                    iCommands[i]);
   242                                    iCommands[i]));
   243 
   243 
   244         if ( iButtonPressed )
   244         if ( iButtonPressed )
   245             {
   245             {
   246             frameId = SelectPressedButton( frameId );
   246             frameId = SelectPressedButton( frameId );
   247             }
   247             }
   348 //
   348 //
   349 void CBubbleTouchPaneButton::GetTextColors( TRgb& aPenColor ) const 
   349 void CBubbleTouchPaneButton::GetTextColors( TRgb& aPenColor ) const 
   350    { 
   350    { 
   351    if ( IsDimmed() ) 
   351    if ( IsDimmed() ) 
   352        {
   352        {
   353        aPenColor = iEikonEnv->ControlColor( EColorButtonTextDimmed, *this ); 
   353        // Using parameter EColorButtonTextDimmed does not return valid 
       
   354        // color for the text that is used in dimmed button. We have 
       
   355        // to use default text and set it transparent.
       
   356        aPenColor = iEikonEnv->ControlColor( EColorButtonText, *this );
       
   357        aPenColor.SetAlpha( KDimmedTransparency );
   354        }
   358        }
   355    else if ( iButtonPressed )
   359    else if ( iButtonPressed )
   356        {
   360        {
   357        aPenColor = iEikonEnv->ControlColor( EColorButtonTextPressed, *this );
   361        aPenColor = iEikonEnv->ControlColor( EColorButtonTextPressed, *this );
   358        }
   362        }