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

Unified Diff: chrome/browser/ui/views/toolbar/back_button.cc

Issue 2067893002: Don't use dashed focus painter on back button in MD mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch on md flag instead Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698