| Index: ui/views/controls/button/md_text_button.cc
|
| diff --git a/ui/views/controls/button/md_text_button.cc b/ui/views/controls/button/md_text_button.cc
|
| index 4f38188c47a507db70b468b8e0a818b6e9966021..1036a2addf0ee7acf71f08671d10fccae9d46e37 100644
|
| --- a/ui/views/controls/button/md_text_button.cc
|
| +++ b/ui/views/controls/button/md_text_button.cc
|
| @@ -113,7 +113,11 @@ void MdTextButton::UpdateColorsFromNativeTheme() {
|
| ui::NativeTheme::ColorId fg_color_id = ui::NativeTheme::kColorId_NumColors;
|
| switch (cta_) {
|
| case NO_CALL_TO_ACTION:
|
| - fg_color_id = ui::NativeTheme::kColorId_ButtonEnabledColor;
|
| + // When there's no call to action, respect a color override if one has
|
| + // been set. For other call to action states, don't let individual buttons
|
| + // specify a color.
|
| + if (!explicitly_set_normal_color())
|
| + fg_color_id = ui::NativeTheme::kColorId_ButtonEnabledColor;
|
| break;
|
| case WEAK_CALL_TO_ACTION:
|
| fg_color_id = ui::NativeTheme::kColorId_CallToActionColor;
|
| @@ -123,7 +127,8 @@ void MdTextButton::UpdateColorsFromNativeTheme() {
|
| break;
|
| }
|
| ui::NativeTheme* theme = GetNativeTheme();
|
| - SetEnabledTextColors(theme->GetSystemColor(fg_color_id));
|
| + if (fg_color_id != ui::NativeTheme::kColorId_NumColors)
|
| + SetEnabledTextColors(theme->GetSystemColor(fg_color_id));
|
|
|
| set_background(
|
| cta_ == STRONG_CALL_TO_ACTION
|
|
|