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

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: 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..8a03cd31f29fe0ccf675d8f47e72ed61c4c7f7f3 100644
--- a/chrome/browser/ui/views/toolbar/back_button.cc
+++ b/chrome/browser/ui/views/toolbar/back_button.cc
@@ -21,11 +21,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 (focus_painter()) {
Peter Kasting 2016/06/14 17:51:59 Who would be setting this? It reads here a bit li
Evan Stade 2016/06/14 17:57:34 ToolbarButton (the parent class). In my head it re
Peter Kasting 2016/06/14 18:00:21 Does ToolbarButton ever add such a focus painter?
+ 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