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

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

Issue 2346893002: Share a common alpha value used for displaying disabled state in Harmony (Closed)
Patch Set: compiling is underrated Created 4 years, 3 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') | ui/views/controls/button/toggle_button.cc » ('j') | 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 3e582db3ca6957318412b8a37b1d2f823aad429d..327c347b55c83102a79e02bfaf0d71be9f2c9f6d 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -7,6 +7,7 @@
#include "base/i18n/case_conversion.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
@@ -307,7 +308,8 @@ void MdTextButton::UpdateColors() {
bg_color = theme->GetSystemColor(
ui::NativeTheme::kColorId_CallToActionColor);
if (state() == STATE_DISABLED)
- bg_color = color_utils::BlendTowardOppositeLuma(bg_color, 0x61);
+ bg_color = color_utils::BlendTowardOppositeLuma(
+ bg_color, gfx::kDisabledControlAlpha);
} else if (is_default()) {
bg_color = color_utils::BlendTowardOppositeLuma(text_color, 0xD8);
}
« no previous file with comments | « ui/native_theme/native_theme_dark_aura.cc ('k') | ui/views/controls/button/toggle_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698