Chromium Code Reviews| Index: ui/views/controls/button/blue_button.cc |
| diff --git a/ui/views/controls/button/blue_button.cc b/ui/views/controls/button/blue_button.cc |
| index ddf7e37b99e3371f4530c72edfdf3fbe245d1ea5..a7dda6dcee3da954e5afc576eff4b00d30a00d8e 100644 |
| --- a/ui/views/controls/button/blue_button.cc |
| +++ b/ui/views/controls/button/blue_button.cc |
| @@ -11,8 +11,7 @@ |
| namespace { |
| -// Default text and shadow colors for the blue button. |
| -const SkColor kBlueButtonTextColor = SK_ColorWHITE; |
| +// Default shadow color for the blue button. |
| const SkColor kBlueButtonShadowColor = SkColorSetRGB(0x53, 0x8C, 0xEA); |
| } // namespace |
| @@ -34,8 +33,20 @@ BlueButton::~BlueButton() {} |
| void BlueButton::ResetColorsFromNativeTheme() { |
| LabelButton::ResetColorsFromNativeTheme(); |
| if (!gfx::IsInvertedColorScheme()) { |
| - for (size_t state = STATE_NORMAL; state < STATE_COUNT; ++state) |
| - SetTextColor(static_cast<ButtonState>(state), kBlueButtonTextColor); |
| + SetTextColor(STATE_NORMAL, GetNativeTheme()-> |
| + GetSystemColor( |
| + ui::NativeTheme::kColorId_CallToActionButtonEnabledColor)); |
| + SetTextColor(STATE_HOVERED, GetNativeTheme()-> |
| + GetSystemColor( |
| + ui::NativeTheme::kColorId_CallToActionButtonHoverColor)); |
| + SetTextColor(STATE_PRESSED, GetNativeTheme()-> |
| + GetSystemColor( |
| + ui::NativeTheme::kColorId_CallToActionButtonHighlightColor)); |
| + SetTextColor(STATE_DISABLED, GetNativeTheme()-> |
| + GetSystemColor( |
| + ui::NativeTheme::kColorId_CallToActionButtonDisabledColor)); |
| + |
| + // TODO(estade): this is not great on system themes. |
|
msw
2014/06/02 21:06:20
Perhaps we could use a partially transparent versi
Evan Stade
2014/06/02 22:18:14
I'd be inclined to have no shadow on gtk system th
|
| label()->SetShadowColors(kBlueButtonShadowColor, kBlueButtonShadowColor); |
| label()->SetShadowOffset(0, 1); |
| } |