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

Fix the issue that AppList shows the rounded corners in fullscreen

AppListView::OnWindowBoundsChanged fills the corners by translating
AppListBackgroundShield when AppList shows in HALF state and the virtual
keyboard is enabled. However, AppListView::Layout may be called after
AppListView::OnWindowBoundsChanged (the side effect of crrev.com/c/1547051)
and it resets the view's transform. As a result. the rounded corners
show again. Fix this issue by modifying
AppListView::UpdateAppListBackgroundYPosition which is
always called by AppListView::Layout.

Bug: 968698
Change-Id: I7a0852115ea4363c44a51e299af93fc6bc1c4623
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1656161
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668554}
parent b512974b
...@@ -2124,7 +2124,13 @@ void AppListView::UpdateAppListBackgroundYPosition() { ...@@ -2124,7 +2124,13 @@ void AppListView::UpdateAppListBackgroundYPosition() {
transform.Translate( transform.Translate(
0, -kAppListBackgroundRadius * (app_list_transition_progress - 1)); 0, -kAppListBackgroundRadius * (app_list_transition_progress - 1));
} }
} else if (is_fullscreen()) { } else if (is_fullscreen() ||
(app_list_state_ == ash::AppListViewState::kHalf &&
GetBoundsInScreen().y() == 0)) {
// AppListView::Layout may be called after OnWindowBoundsChanged. It may
// reset the transform of |app_list_background_shield_|. So hide the rounded
// corners when AppListView is in Half state and its bottom is on the
// display edge.
transform.Translate(0, -kAppListBackgroundRadius); transform.Translate(0, -kAppListBackgroundRadius);
} }
app_list_background_shield_->SetTransform(transform); app_list_background_shield_->SetTransform(transform);
......
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