Commit 66506bb8 authored by MinChen's avatar MinChen Committed by Commit Bot

Add animation when swiping app list from shelf.

Swiping up from shelf to open app list is only for tablet currently.
So set state as FULLSCREEN_ALL_APPS directly to add the animation.
Otherwise, the app list will just snap to the top of the screen.

Bug: None
Change-Id: I281ae53700294221b0c96c9a2aa1d4c66822f2bf
Reviewed-on: https://chromium-review.googlesource.com/598740Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: min c <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491765}
parent 644f0f57
......@@ -960,9 +960,13 @@ void AppListView::SetStateFromSearchBoxView(bool search_box_is_empty) {
void AppListView::UpdateYPositionAndOpacity(int y_position_in_screen,
float background_opacity,
bool is_end_gesture) {
gfx::Rect new_widget_bounds = fullscreen_widget_->GetWindowBoundsInScreen();
new_widget_bounds.set_y(std::max(y_position_in_screen, 0));
fullscreen_widget_->SetBounds(new_widget_bounds);
if (is_end_gesture) {
SetState(FULLSCREEN_ALL_APPS);
} else {
gfx::Rect new_widget_bounds = fullscreen_widget_->GetWindowBoundsInScreen();
new_widget_bounds.set_y(std::max(y_position_in_screen, 0));
fullscreen_widget_->SetBounds(new_widget_bounds);
}
UpdateOpacity(background_opacity, is_end_gesture);
}
......
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