Commit 59514e1f authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Tray: Add some padding to the date info button so the focus ring is rendered better.

TEST=manually verified UI
BUG=860190

Change-Id: I431cf99e850f77ab64a02e054272c449cd9bc04e
Reviewed-on: https://chromium-review.googlesource.com/c/1490505
Commit-Queue: Tim Song <tengs@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635916}
parent 635cabaf
......@@ -206,6 +206,7 @@ constexpr int kTrayTopShortcutButtonIconSize = 20;
constexpr int kUnifiedSystemInfoHeight = 16;
constexpr int kUnifiedSystemInfoSpacing = 8;
constexpr gfx::Insets kUnifiedSystemInfoDateViewPadding(3);
// Constants used in FeaturePodsView of UnifiedSystemTray.
constexpr gfx::Size kUnifiedFeaturePodIconSize(48, 48);
......
......@@ -63,6 +63,7 @@ class DateView : public views::Button,
void Update();
// views::Button:
gfx::Insets GetInsets() const override;
std::unique_ptr<views::InkDrop> CreateInkDrop() override;
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
......@@ -116,6 +117,11 @@ void DateView::Update() {
NotifyAccessibilityEvent(ax::mojom::Event::kTextChanged, true);
}
gfx::Insets DateView::GetInsets() const {
// This padding provides room to render the focus ring around this button.
return kUnifiedSystemInfoDateViewPadding;
}
std::unique_ptr<views::InkDrop> DateView::CreateInkDrop() {
return TrayPopupUtils::CreateInkDrop(this);
}
......
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