Commit 7822ae78 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Add insets for TrayBackgroundView focus ring

This will ensure the focus ring is visible with it's full
thickness.

Bug: 1015348
Change-Id: I8d618d3b39b7a4cb48e709eb541f70c10a71573f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947641Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721173}
parent 7aa342e3
...@@ -127,12 +127,15 @@ class TrayBackgroundView::HighlightPathGenerator ...@@ -127,12 +127,15 @@ class TrayBackgroundView::HighlightPathGenerator
// HighlightPathGenerator: // HighlightPathGenerator:
SkPath GetHighlightPath(const views::View* view) override { SkPath GetHighlightPath(const views::View* view) override {
const int focus_ring_padding = 1;
const int border_radius = ShelfConfig::Get()->control_border_radius(); const int border_radius = ShelfConfig::Get()->control_border_radius();
SkPath path; SkPath path;
path.addRoundRect(
gfx::RectToSkRect(static_cast<const TrayBackgroundView*>(view) gfx::Rect bounds =
->GetBackgroundBounds()), static_cast<const TrayBackgroundView*>(view)->GetBackgroundBounds();
border_radius, border_radius); bounds.Inset(gfx::Insets(focus_ring_padding));
path.addRoundRect(gfx::RectToSkRect(bounds), border_radius, border_radius);
return path; return path;
} }
......
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