Commit f0c8c4ec authored by Allen Bauer's avatar Allen Bauer Committed by Commit Bot

Make sure the chip label's insets aren't dependent on the size

Bug: 1023840
Change-Id: I2a0cdf65c32ee6e48f0adee37d0f0a214e7d9a5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919322
Commit-Queue: Dana Fried <dfried@chromium.org>
Reviewed-by: default avatarDana Fried <dfried@chromium.org>
Auto-Submit: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715949}
parent 6d178d4e
......@@ -40,9 +40,10 @@ class ChipLabel : public views::Label {
// views::Label
gfx::Insets GetInsets() const override {
const int icon_size = GetLayoutConstant(LOCATION_BAR_ICON_SIZE);
const int chip_corner_radius =
views::LayoutProvider::Get()->GetCornerRadiusMetric(
views::EMPHASIS_MAXIMUM, size());
views::EMPHASIS_MAXIMUM, gfx::Size(icon_size, icon_size));
return gfx::Insets(0, chip_corner_radius, 0, chip_corner_radius);
}
gfx::Size CalculatePreferredSize() const override {
......
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