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

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: const & 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
« no previous file with comments | « ui/views/controls/button/label_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..093ea261c42a321bf0f47a1e565b1e0bb76dff5c 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -251,8 +251,11 @@ void MdTextButton::UpdateColors() {
: ui::NativeTheme::kColorId_ButtonEnabledColor;
ui::NativeTheme* theme = GetNativeTheme();
- if (!explicitly_set_normal_color())
+ if (!explicitly_set_normal_color()) {
+ const auto colors = explicitly_set_colors();
LabelButton::SetEnabledTextColors(theme->GetSystemColor(fg_color_id));
+ set_explicitly_set_colors(colors);
+ }
// Prominent buttons keep their enabled text color; disabled state is conveyed
// by shading the background instead.
« no previous file with comments | « ui/views/controls/button/label_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698