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

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

Issue 2409563002: views: use darker stroke for non-prominent buttons (Closed)
Patch Set: Created 4 years, 2 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/native_theme/native_theme_dark_aura.cc ('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 9b3d05986a6469e9d7ec436c6575f13065149d8d..3101cdf87e0a2f4fafa82af57de25c73becb3c8a 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -250,7 +250,6 @@ void MdTextButton::UpdateColors() {
if (is_prominent_)
SetTextColor(STATE_DISABLED, theme->GetSystemColor(fg_color_id));
- SkColor text_color = label()->enabled_color();
SkColor bg_color =
theme->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground);
@@ -270,8 +269,9 @@ void MdTextButton::UpdateColors() {
bg_color = color_utils::GetResultingPaintColor(shade, bg_color);
}
- SkColor stroke_color =
- is_prominent_ ? SK_ColorTRANSPARENT : SkColorSetA(text_color, 0x33);
+ SkColor stroke_color = theme->GetSystemColor(
+ is_prominent_ ? ui::NativeTheme::kColorId_ProminentButtonBorderColor
+ : ui::NativeTheme::kColorId_NonProminentButtonBorderColor);
Evan Stade 2016/10/10 17:13:49 this doesn't work well for buttons that use custom
DCHECK_EQ(SK_AlphaOPAQUE, static_cast<int>(SkColorGetA(bg_color)));
set_background(Background::CreateBackgroundPainter(
true, Painter::CreateRoundRectWith1PxBorderPainter(
« no previous file with comments | « ui/native_theme/native_theme_dark_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698