Commit b1240b4e authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Fix Collapse Button Focus Ring

Add Highlight Path for Collapse Button Focus

Bug: 922423
Test: Manual Test on PixelBook
Change-Id: If37e818714ccbd5248e2257e346378b3d848bbc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1542562
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Reviewed-by: default avatarTim Song <tengs@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649802}
parent 550077bb
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "ui/views/animation/ink_drop_impl.h" #include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/ink_drop_mask.h" #include "ui/views/animation/ink_drop_mask.h"
#include "ui/views/border.h" #include "ui/views/border.h"
#include "ui/views/view_class_properties.h"
namespace ash { namespace ash {
...@@ -104,6 +105,9 @@ void CustomShapeButton::PaintCustomShapePath(gfx::Canvas* canvas) { ...@@ -104,6 +105,9 @@ void CustomShapeButton::PaintCustomShapePath(gfx::Canvas* canvas) {
CollapseButton::CollapseButton(views::ButtonListener* listener) CollapseButton::CollapseButton(views::ButtonListener* listener)
: CustomShapeButton(listener) { : CustomShapeButton(listener) {
OnEnabledChanged(); OnEnabledChanged();
auto path = std::make_unique<SkPath>(
CreateCustomShapePath(gfx::Rect(CalculatePreferredSize())));
SetProperty(views::kHighlightPathKey, path.release());
} }
CollapseButton::~CollapseButton() = default; CollapseButton::~CollapseButton() = default;
......
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