Commit 922255c8 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[Dice] Address follow up comments

This CL finishes to address the comments for
https://chromium-review.googlesource.com/c/chromium/src/+/934510

Bug: 813497
Change-Id: If09a1070c8a67d57fc178a19f236ba613f876b7e
Reviewed-on: https://chromium-review.googlesource.com/950282Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541033}
parent 64b27c9c
......@@ -125,8 +125,6 @@ HoverButton::HoverButton(views::ButtonListener* button_listener,
if (combined_line_height > icon_height)
remaining_vert_spacing = (total_height - combined_line_height) / 2;
SetBorder(CreateBorderWithVerticalSpacing(remaining_vert_spacing));
views::GridLayout* grid_layout =
SetLayoutManager(std::make_unique<views::GridLayout>(this));
// Badging may make the icon slightly wider (but not taller). However, the
......@@ -208,9 +206,7 @@ HoverButton::HoverButton(views::ButtonListener* button_listener,
SetTooltipAndAccessibleName(this, title_, subtitle_, GetLocalBounds(),
taken_width_, auto_compute_tooltip_);
// Since this constructor doesn't use the |LabelButton|'s image / label Views,
// make sure the minimum size is correct according to the |grid_layout|.
SetMinSize(gfx::Size(grid_layout->GetPreferredSize(this)));
SetBorder(CreateBorderWithVerticalSpacing(remaining_vert_spacing));
}
HoverButton::~HoverButton() {}
......
......@@ -47,7 +47,7 @@ class HoverButton : public views::LabelButton {
~HoverButton() override;
// views::View:
// views::LabelButton:
void SetBorder(std::unique_ptr<views::Border> b) override;
// Updates the title text, and applies the secondary style to the text
......
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