Commit 2a3485db authored by Wei Li's avatar Wei Li Committed by Commit Bot

Explicitly set focus behavior of FocusableLabelButton

FocusableLabelButton already sets its own focus ring. It is meant to be
focusable as well. So explicitly set its focus behavior in this class
instead of setting it for each instance.

Bug: 1001103
Change-Id: Ie2169e9bf8a3d27200444c03da86f69eae6ee725
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495702Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820788}
parent 491e000c
......@@ -100,6 +100,7 @@ class PinRequestView::FocusableLabelButton : public views::LabelButton {
: views::LabelButton(listener, text) {
SetInstallFocusRingOnFocus(true);
focus_ring()->SetColor(ShelfConfig::Get()->shelf_focus_border_color());
SetFocusBehavior(FocusBehavior::ALWAYS);
}
FocusableLabelButton(const FocusableLabelButton&) = delete;
......@@ -366,7 +367,6 @@ PinRequestView::PinRequestView(PinRequest request, Delegate* delegate)
help_button_->layer()->SetFillsBoundsOpaquely(false);
help_button_->SetTextSubpixelRenderingEnabled(false);
help_button_->SetEnabledTextColors(kTextColor);
help_button_->SetFocusBehavior(FocusBehavior::ALWAYS);
help_button_->SetVisible(request.help_button_enabled);
footer->AddChildView(help_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