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

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

Issue 2187473004: Make normal MD text buttons *on infobars* white. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/md_text_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 37b68766e26d8459d7c9957bb0213b4b44e65225..ebb275ea5cc56a4559bf107646258818b68a89e7 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -254,20 +254,20 @@ void MdTextButton::UpdateColors() {
is_cta_ ? ui::NativeTheme::kColorId_TextOnCallToActionColor
: ui::NativeTheme::kColorId_ButtonEnabledColor;
- // When there's no call to action, respect a color override if one has
- // been set. For call to action styling, don't let individual buttons
- // specify a color.
ui::NativeTheme* theme = GetNativeTheme();
- if (is_cta_ || !explicitly_set_normal_color())
+ if (!explicitly_set_normal_color())
LabelButton::SetEnabledTextColors(theme->GetSystemColor(fg_color_id));
SkColor text_color = label()->enabled_color();
SkColor bg_color =
- is_cta_
- ? theme->GetSystemColor(ui::NativeTheme::kColorId_CallToActionColor)
- : is_default()
- ? color_utils::BlendTowardOppositeLuma(text_color, 0xD8)
- : SK_ColorWHITE;
+ bg_color_override_
sky 2016/07/26 23:27:27 I'm happy you found a way to make this more impene
Evan Stade 2016/07/26 23:29:56 I heard you like ternaries! Personally I think th
+ ? *bg_color_override_
+ : is_cta_
+ ? theme->GetSystemColor(
+ ui::NativeTheme::kColorId_CallToActionColor)
+ : is_default()
+ ? color_utils::BlendTowardOppositeLuma(text_color, 0xD8)
+ : SK_ColorTRANSPARENT;
const SkAlpha kStrokeOpacity = 0x1A;
SkColor stroke_color = (is_cta_ || color_utils::IsDark(text_color))
« no previous file with comments | « ui/views/controls/button/md_text_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698