Commit 40f30db0 authored by Charlene Yan's avatar Charlene Yan Committed by Commit Bot

Do not install focus rings for buttons in the extensions menu.

Bug: 1005618
Change-Id: I379360ea93312f7d6a3b0d9005b2b6895ac22b2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816717Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Charlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698575}
parent 238171e3
...@@ -27,6 +27,9 @@ ExtensionsMenuButton::ExtensionsMenuButton( ...@@ -27,6 +27,9 @@ ExtensionsMenuButton::ExtensionsMenuButton(
parent_(parent), parent_(parent),
controller_(controller) { controller_(controller) {
SetInkDropMode(InkDropMode::ON); SetInkDropMode(InkDropMode::ON);
// Items within a menu should not show focus rings.
SetInstallFocusRingOnFocus(false);
SetFocusBehavior(FocusBehavior::ALWAYS); SetFocusBehavior(FocusBehavior::ALWAYS);
SetButtonController(std::make_unique<HoverButtonController>( SetButtonController(std::make_unique<HoverButtonController>(
this, this, this, this,
......
...@@ -30,6 +30,9 @@ std::unique_ptr<views::ImageButton> CreateButton( ...@@ -30,6 +30,9 @@ std::unique_ptr<views::ImageButton> CreateButton(
int id, int id,
views::ButtonListener* listener) { views::ButtonListener* listener) {
auto button = views::CreateVectorImageButton(listener); auto button = views::CreateVectorImageButton(listener);
// Items within a menu should not show focus rings.
button->SetInstallFocusRingOnFocus(false);
button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS); button->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
button->SetID(id); button->SetID(id);
return button; return button;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment