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

Unified Diff: ui/views/controls/focusable_border.cc

Issue 2319193002: More Harmony combobox/textfield updates: (Closed)
Patch Set: textfields 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') | ui/views/controls/textfield/textfield.cc » ('j') | 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 8aa775dbb782b888becfa9f5a349802b2a606b9c..b48d1331b276eba640ee7b47e58899274247787b 100644
--- a/ui/views/controls/focusable_border.cc
+++ b/ui/views/controls/focusable_border.cc
@@ -9,6 +9,7 @@
#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/gfx/geometry/insets.h"
#include "ui/gfx/scoped_canvas.h"
#include "ui/gfx/skia_util.h"
@@ -85,9 +86,12 @@ 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_;
- return view.GetNativeTheme()->GetSystemColor(
+ 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);
+ return color;
}
} // namespace views
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698