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

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

Issue 2001843002: Use ink drop hover for focus states on toolbar buttons and location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout Created 4 years, 7 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
Index: chrome/browser/ui/views/toolbar/app_menu_button.cc
diff --git a/chrome/browser/ui/views/toolbar/app_menu_button.cc b/chrome/browser/ui/views/toolbar/app_menu_button.cc
index 3712d47675f8e0b6ee27c04f63bcc6aece5889d0..9db62bc1d38cccf88dee9237922739e7215db784 100644
--- a/chrome/browser/ui/views/toolbar/app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu_button.cc
@@ -41,9 +41,9 @@ AppMenuButton::AppMenuButton(ToolbarView* toolbar_view)
allow_extension_dragging_(
extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()),
margin_trailing_(0),
- ink_drop_delegate_(new views::ButtonInkDropDelegate(this, this)),
weak_factory_(this) {
- set_ink_drop_delegate(ink_drop_delegate_.get());
+ set_ink_drop_delegate(
+ base::WrapUnique(new views::ButtonInkDropDelegate(this, this)));
if (!ui::MaterialDesignController::IsModeMaterial())
icon_painter_.reset(new AppMenuIconPainter(this));
}
@@ -160,9 +160,12 @@ void AppMenuButton::SetTrailingMargin(int margin) {
UpdateThemedBorder();
- const int inset = LabelButton::kFocusRectInset;
- SetFocusPainter(views::Painter::CreateDashedFocusPainterWithInsets(
- gfx::Insets(inset, inset, inset, inset + margin)));
+ if (!ui::MaterialDesignController::IsModeMaterial()) {
+ const int inset = LabelButton::kFocusRectInset;
+ SetFocusPainter(views::Painter::CreateDashedFocusPainterWithInsets(
+ gfx::Insets(inset, inset, inset, inset + margin)));
+ }
+
InvalidateLayout();
}
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu_button.h ('k') | chrome/browser/ui/views/toolbar/toolbar_action_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698