javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbutton.cpp
branchRCL_3
changeset 23 e5618cc85d74
parent 19 71c436fe3ce0
child 24 6c158198356e
equal deleted inserted replaced
21:4376525cdefb 23:e5618cc85d74
   211     iButton->SetIconScaleMode(EAspectRatioPreserved);
   211     iButton->SetIconScaleMode(EAspectRatioPreserved);
   212 
   212 
   213     iButton->SetBackground(this);   // Back will be drawn by ASwtControlBase::Draw
   213     iButton->SetBackground(this);   // Back will be drawn by ASwtControlBase::Draw
   214 
   214 
   215     // Set default color
   215     // Set default color
   216     TRgb colorNormal;
   216     TRgb color;
   217     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   217     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   218                               colorNormal,
   218                               color,
   219                               KAknsIIDQsnTextColors,
   219                               KAknsIIDQsnTextColors,
   220                               EAknsCIQsnTextColorsCG13); // SK
   220                               EAknsCIQsnTextColorsCG6);
   221     TRgb colorPressed;
   221     iButton->OverrideColorL(EColorButtonText, color);
   222     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
       
   223                               colorPressed,
       
   224                               KAknsIIDQsnTextColors,
       
   225                               EAknsCIQsnTextColorsCG69); // pressed SK
       
   226     iButton->OverrideColorL(EColorButtonText, colorNormal);
       
   227     iButton->OverrideColorL(EColorButtonTextPressed, colorPressed);
       
   228 }
   222 }
   229 
   223 
   230 // ---------------------------------------------------------------------------
   224 // ---------------------------------------------------------------------------
   231 // CSwtButton::ChangeStateL
   225 // CSwtButton::ChangeStateL
   232 // ---------------------------------------------------------------------------
   226 // ---------------------------------------------------------------------------
   644     {
   638     {
   645         color = aColor->RgbValue();
   639         color = aColor->RgbValue();
   646     }
   640     }
   647     else
   641     else
   648     {
   642     {
   649         // Reset to default color
       
   650         TRgb colorNormal;
       
   651         AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   643         AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   652                                   colorNormal,
   644                                   color,
   653                                   KAknsIIDQsnTextColors,
   645                                   KAknsIIDQsnTextColors,
   654                                   EAknsCIQsnTextColorsCG13); // SK
   646                                   EAknsCIQsnTextColorsCG6);
   655         iButton->OverrideColorL(EColorButtonText, colorNormal);
       
   656     }
   647     }
   657 
   648 
   658     if (iButton)
   649     if (iButton)
   659     {
   650     {
   660         iButton->OverrideColorL(EColorButtonText, color);
   651         iButton->OverrideColorL(EColorButtonText, color);