Chromium Code Reviews| Index: chrome/browser/ui/views/toolbar/back_button.cc |
| diff --git a/chrome/browser/ui/views/toolbar/back_button.cc b/chrome/browser/ui/views/toolbar/back_button.cc |
| index f713da2bd9f9f282a2956b02666bf354a6b2f286..b39510683f84315158db586f1d5fcb01093f73b2 100644 |
| --- a/chrome/browser/ui/views/toolbar/back_button.cc |
| +++ b/chrome/browser/ui/views/toolbar/back_button.cc |
| @@ -4,6 +4,7 @@ |
| #include "chrome/browser/ui/views/toolbar/back_button.h" |
| +#include "ui/base/material_design/material_design_controller.h" |
| #include "ui/gfx/geometry/insets.h" |
| #include "ui/views/animation/ink_drop.h" |
| #include "ui/views/controls/button/label_button_border.h" |
| @@ -21,11 +22,13 @@ void BackButton::SetLeadingMargin(int margin) { |
| UpdateThemedBorder(); |
| - const int inset = LabelButton::kFocusRectInset; |
| - const bool is_rtl = base::i18n::IsRTL(); |
| - const gfx::Insets insets(inset, inset + (is_rtl ? 0 : margin), |
| - inset, inset + (is_rtl ? margin : 0)); |
| - SetFocusPainter(views::Painter::CreateDashedFocusPainterWithInsets(insets)); |
| + if (!ui::MaterialDesignController::IsModeMaterial()) { |
|
Peter Kasting
2016/06/14 22:11:57
Heh, I'd been thinking to have both conditions her
|
| + const int inset = LabelButton::kFocusRectInset; |
| + const bool is_rtl = base::i18n::IsRTL(); |
| + const gfx::Insets insets(inset, inset + (is_rtl ? 0 : margin), |
| + inset, inset + (is_rtl ? margin : 0)); |
| + SetFocusPainter(views::Painter::CreateDashedFocusPainterWithInsets(insets)); |
| + } |
| InvalidateLayout(); |
| } |