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

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

Issue 2383243002: Refactor MdFocusRing to make it easier to reuse on other controls. (Closed)
Patch Set: install 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/views/controls/focusable_border.h ('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 2d500a90f9f133f6afca0c239ec1f901b8ec56d7..fbe8cb2a4e479d4a4868405733f7b1c1929d1bb6 100644
--- a/ui/views/controls/focusable_border.cc
+++ b/ui/views/controls/focusable_border.cc
@@ -43,6 +43,10 @@ void FocusableBorder::UseDefaultColor() {
}
void FocusableBorder::Paint(const View& view, gfx::Canvas* canvas) {
+ // In harmony, the focus indicator is a FocusRing.
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial() && view.HasFocus())
+ return;
+
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
paint.setColor(GetCurrentColor(view));
« no previous file with comments | « ui/views/controls/focusable_border.h ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698