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

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

Issue 2111323003: Turn off the auto color readability of LabelButton in non-high contrast mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test for this CL 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/label_button.h ('k') | ui/views/controls/button/label_button_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 0979be6bfc5193bfacf3686a5ed71c9ce4bef2c2..0618cca6cfe71a213a9cb613132866d85843f938 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -496,11 +496,11 @@ void LabelButton::ResetColorsFromNativeTheme() {
label_->set_background(Background::CreateSolidBackground(SK_ColorBLACK));
label_->SetAutoColorReadabilityEnabled(true);
label_->SetShadows(gfx::ShadowValues());
- } else if (style() == STYLE_BUTTON) {
- PlatformStyle::ApplyLabelButtonTextStyle(label_, &colors);
- label_->set_background(nullptr);
} else {
+ if (style() == STYLE_BUTTON)
+ PlatformStyle::ApplyLabelButtonTextStyle(label_, &colors);
label_->set_background(nullptr);
+ label_->SetAutoColorReadabilityEnabled(false);
}
for (size_t state = STATE_NORMAL; state < STATE_COUNT; ++state) {
« no previous file with comments | « ui/views/controls/button/label_button.h ('k') | ui/views/controls/button/label_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698