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

Unified Diff: ui/views/controls/focusable_border.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/views/controls/combobox/combobox.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/focusable_border.cc
diff --git a/ui/views/controls/focusable_border.cc b/ui/views/controls/focusable_border.cc
index ee4005756d273f7400db24db20eea8d7f7767188..2d500a90f9f133f6afca0c239ec1f901b8ec56d7 100644
--- a/ui/views/controls/focusable_border.cc
+++ b/ui/views/controls/focusable_border.cc
@@ -85,11 +85,16 @@ void FocusableBorder::SetInsets(int top, int left, int bottom, int right) {
SkColor FocusableBorder::GetCurrentColor(const View& view) const {
if (!use_default_color_)
return override_color_;
+
SkColor color = view.GetNativeTheme()->GetSystemColor(
view.HasFocus() ? ui::NativeTheme::kColorId_FocusedBorderColor :
ui::NativeTheme::kColorId_UnfocusedBorderColor);
- if (ui::MaterialDesignController::IsSecondaryUiMaterial() && !view.enabled())
- color = color_utils::BlendTowardOppositeLuma(color, 0x61);
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial() &&
+ !view.enabled()) {
+ return color_utils::BlendTowardOppositeLuma(color,
+ gfx::kDisabledControlAlpha);
+ }
+
return color;
}
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698