javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbutton.cpp
branchRCL_3
changeset 34 71c436fe3ce0
parent 24 0fd27995241b
child 59 e5618cc85d74
equal deleted inserted replaced
25:9ac0a0a7da70 34:71c436fe3ce0
   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 color;
   216     TRgb colorNormal;
   217     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   217     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   218                               color,
   218                               colorNormal,
   219                               KAknsIIDQsnTextColors,
   219                               KAknsIIDQsnTextColors,
   220                               EAknsCIQsnTextColorsCG63); // Messaging touch buttons
   220                               EAknsCIQsnTextColorsCG13); // SK
   221     iButton->OverrideColorL(EColorButtonText, color);
   221     TRgb colorPressed;
       
   222     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
       
   223                               colorPressed,
       
   224                               KAknsIIDQsnTextColors,
       
   225                               EAknsCIQsnTextColorsCG69); // pressed SK
       
   226     iButton->OverrideColorL(EColorButtonText, colorNormal);
       
   227     iButton->OverrideColorL(EColorButtonTextPressed, colorPressed);
   222 }
   228 }
   223 
   229 
   224 // ---------------------------------------------------------------------------
   230 // ---------------------------------------------------------------------------
   225 // CSwtButton::ChangeStateL
   231 // CSwtButton::ChangeStateL
   226 // ---------------------------------------------------------------------------
   232 // ---------------------------------------------------------------------------
   639         color = aColor->RgbValue();
   645         color = aColor->RgbValue();
   640     }
   646     }
   641     else
   647     else
   642     {
   648     {
   643         // Reset to default color
   649         // Reset to default color
       
   650         TRgb colorNormal;
   644         AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   651         AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
   645                                   color,
   652                                   colorNormal,
   646                                   KAknsIIDQsnTextColors,
   653                                   KAknsIIDQsnTextColors,
   647                                   EAknsCIQsnTextColorsCG63); // Messaging touch buttons
   654                                   EAknsCIQsnTextColorsCG13); // SK
       
   655         iButton->OverrideColorL(EColorButtonText, colorNormal);
   648     }
   656     }
   649 
   657 
   650     if (iButton)
   658     if (iButton)
   651     {
   659     {
   652         iButton->OverrideColorL(EColorButtonText, color);
   660         iButton->OverrideColorL(EColorButtonText, color);
  1180             }
  1188             }
  1181         }
  1189         }
  1182 #endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
  1190 #endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
  1183         iButton->HandlePointerEventL(aPointerEvent);
  1191         iButton->HandlePointerEventL(aPointerEvent);
  1184     }
  1192     }
       
  1193 
       
  1194     PostMouseEventL(aPointerEvent);
  1185 }
  1195 }
  1186 #endif // RD_SCALABLE_UI_V2
  1196 #endif // RD_SCALABLE_UI_V2
  1187 
  1197 
  1188 // ---------------------------------------------------------------------------
  1198 // ---------------------------------------------------------------------------
  1189 // CSwtButton::MSKLabelL
  1199 // CSwtButton::MSKLabelL