uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 23 3d340a0166ff
--- a/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -487,13 +487,24 @@
                         *button, EColorControlBackground, KRgbWhite ) );
                     TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL( 
                         *button, EColorButtonText, KRgbBlack ) );
+                    }               
+                else 
+                    {
+                    //Reset the pressed down text color when get the skin change message and 
+                    // KAknTbExtensionDsaMode isn't used.
+                    TRgb pressDownColor;
+                    if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), 
+                            pressDownColor, KAknsIIDQsnTextColors, 
+                            EAknsCIQsnTextColorsCG11 ) == KErrNone )
+                        {
+                        TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL( *button, 
+                                    EColorButtonTextPressed, pressDownColor ) );                        
+                        }               
                     }
                 }
             }
         }
 
-
-
     // Remember to check here if iSelectedItem still is in iVisibleItems, and if 
     // not then do something. 
     if ( ( aType == KAknsMessageSkinChange || 
@@ -770,8 +781,22 @@
         cell_tb_ext_pane_t1( useOutline ? 0 : 1 ).LayoutLine().FontId() );
 
     aButton.SetTextFont( font ); 
-    aButton.SetTextColorIds( KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG60 );
-
+    aButton.SetTextColorIds( KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG20 );
+    
+    
+    //Using CAknButton default frame if KAknTbExtensionTransparent 
+    //and KAknTbExtensionDsaMode are not defined.
+    if ( !( iExtension->ExtensionFlags() & KAknTbExtensionTransparent  ||
+            iExtension->ExtensionFlags() & KAknTbExtensionDsaMode ) ) 
+        {
+        aButton.SetFrameAndCenterIds(
+                KAknsIIDQsnFrButtonNormal, KAknsIIDQsnFrButtonCenterNormal,
+                KAknsIIDQsnFrButtonPressed, KAknsIIDQsnFrButtonCenterPressed,
+                KAknsIIDQsnFrButtonInactive, KAknsIIDQsnFrButtonCenterInactive, 
+                KAknsIIDQsnFrGrid, KAknsIIDQsnFrGridCenter,
+                KAknsIIDQsnFrButtonInactive, KAknsIIDQsnFrButtonCenterInactive );
+        }
+    
     if ( iExtension->ExtensionFlags() & KAknTbExtensionDsaMode )
         {
         AknLayoutUtils::OverrideControlColorL( aButton, 
@@ -779,6 +804,18 @@
         AknLayoutUtils::OverrideControlColorL( aButton, 
             EColorButtonText, KRgbBlack );
         }
+    else
+        {
+        //Reset the pressed down text color when get the skin change message and 
+        // KAknTbExtensionDsaMode isn't used.
+        TRgb pressDownColor;
+        if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), pressDownColor, 
+                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ) == KErrNone )
+            {
+            AknLayoutUtils::OverrideControlColorL( aButton, 
+                    EColorButtonTextPressed, pressDownColor );        
+            }
+        }
     }