Commit e9e025c0 authored by Andrew Xu's avatar Andrew Xu Committed by Commit Bot

Fix the issue that hotseat background is not updated after icon removal

The issue is introduced by my previous CL: crrev.com/c/1838993, where
the shelf view notifies the parent view of icon removal at the end of
fade out animation. However, when removing the app icon by gesture,
fade out animation is not created. This CL fixes the issue by calling
PreferredSizeChanged() explicitly under such circumstance.

Bug: 1012984
Change-Id: I0bd651966b7f1a9ae82496dfe72fe2d4a02ff2ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850730
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704689}
parent 18ff4d3e
......@@ -2204,6 +2204,11 @@ void ShelfView::ShelfItemRemoved(int model_index, const ShelfItem& old_item) {
view, std::unique_ptr<gfx::AnimationDelegate>(
new FadeOutAnimationDelegate(this, view)));
} else {
// If there is no fade out animation, notify the parent view of the
// changed size before bounds animations start.
if (chromeos::switches::ShouldShowScrollableShelf())
PreferredSizeChanged();
// We don't need to show a fade out animation for invisible |view|. When an
// item is ripped out from the shelf, its |view| is already invisible.
AnimateToIdealBounds();
......
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