Commit f28ece6e authored by Kristi Park's avatar Kristi Park Committed by Commit Bot

Do not set starting grow animation width if icon is not visible

It's possible for width to be non-zero while the icon is hidden. In
this case, we do want to grow the label starting from 0 width.

Change-Id: I80d6d216aef5f5ec8d849fd844ce21e38079f863
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850966Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Kristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705208}
parent f0587fdd
......@@ -436,7 +436,7 @@ void IconLabelBubbleView::AnimateIn(base::Optional<int> string_id) {
if (!label()->GetVisible()) {
// Start animation from the current width, otherwise the icon will also be
// included if visible.
grow_animation_starting_width_ = width();
grow_animation_starting_width_ = GetVisible() ? width() : 0;
if (string_id) {
base::string16 label = l10n_util::GetStringUTF16(string_id.value());
SetLabel(label);
......
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