Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: ui/views/controls/button/md_text_button.cc

Issue 2620453005: Material Design: Fix MdLabelButton not updating text colors on theme changes (Closed)
Patch Set: Refactor Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 4d9e27a072eea4a93a74ae64af0b968711c1fbbc..2e409f43ad72b62e756079c1c74299e066d40540 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -251,8 +251,10 @@ void MdTextButton::UpdateColors() {
: ui::NativeTheme::kColorId_ButtonEnabledColor;
ui::NativeTheme* theme = GetNativeTheme();
- if (!explicitly_set_normal_color())
+ if (!explicitly_set_normal_color()) {
LabelButton::SetEnabledTextColors(theme->GetSystemColor(fg_color_id));
+ LabelButton::ResetExplicitnessOfEnabledTextColors();
+ }
// Prominent buttons keep their enabled text color; disabled state is conveyed
// by shading the background instead.
« ui/views/controls/button/label_button.cc ('K') | « ui/views/controls/button/label_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698