| Index: ui/views/controls/focusable_border.cc
|
| diff --git a/ui/views/controls/focusable_border.cc b/ui/views/controls/focusable_border.cc
|
| index b3ddd149272d50ed0c9ea954b6797708d2d54d6e..a4e76ff1ba2c88e4bd63a56b4f41f9f2cbc9ad3f 100644
|
| --- a/ui/views/controls/focusable_border.cc
|
| +++ b/ui/views/controls/focusable_border.cc
|
| @@ -6,10 +6,13 @@
|
|
|
| #include "third_party/skia/include/core/SkPaint.h"
|
| #include "third_party/skia/include/core/SkPath.h"
|
| +#include "ui/base/material_design/material_design_controller.h"
|
| #include "ui/gfx/canvas.h"
|
| +#include "ui/gfx/color_palette.h"
|
| #include "ui/gfx/geometry/insets.h"
|
| #include "ui/gfx/skia_util.h"
|
| #include "ui/native_theme/native_theme.h"
|
| +#include "ui/views/controls/textfield/textfield.h"
|
|
|
| namespace {
|
|
|
| @@ -21,7 +24,7 @@ namespace views {
|
|
|
| FocusableBorder::FocusableBorder()
|
| : insets_(kInsetSize, kInsetSize, kInsetSize, kInsetSize),
|
| - override_color_(SK_ColorWHITE),
|
| + override_color_(gfx::kPlaceholderColor),
|
| use_default_color_(true) {
|
| }
|
|
|
| @@ -38,14 +41,21 @@ void FocusableBorder::UseDefaultColor() {
|
| }
|
|
|
| void FocusableBorder::Paint(const View& view, gfx::Canvas* canvas) {
|
| - SkPath path;
|
| - path.addRect(gfx::RectToSkRect(view.GetLocalBounds()), SkPath::kCW_Direction);
|
| SkPaint paint;
|
| paint.setStyle(SkPaint::kStroke_Style);
|
| -
|
| paint.setColor(GetCurrentColor(view));
|
| - paint.setStrokeWidth(SkIntToScalar(2));
|
|
|
| + SkPath path;
|
| + if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
|
| + path.moveTo(Textfield::kTextPadding, view.height() - 1);
|
| + path.rLineTo(view.width() - Textfield::kTextPadding * 2, 0);
|
| + path.offset(0.5f, 0.5f);
|
| + paint.setStrokeWidth(SkIntToScalar(1));
|
| + } else {
|
| + path.addRect(gfx::RectToSkRect(view.GetLocalBounds()),
|
| + SkPath::kCW_Direction);
|
| + paint.setStrokeWidth(SkIntToScalar(2));
|
| + }
|
| canvas->DrawPath(path, paint);
|
| }
|
|
|
|
|