Commit dc2ee055 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Prevent in-app -> home jankiness.

The hotseat was losing its opacity, and animating off screen, then
animating back to it's kShown position. Instead of this it should keep
its opacity and animate directly to kShown.

Bug: 1007091
Change-Id: I0a8541ffebaa35a384906d8565a9a2c21a1b2e14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1848902Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Auto-Submit: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704812}
parent 98140cd3
......@@ -1337,7 +1337,9 @@ void ShelfLayoutManager::CalculateTargetBounds(
if (state.IsShelfAutoHidden()) {
shelf_in_screen_portion =
ShelfConfig::Get()->hidden_shelf_in_screen_portion();
home_launcher_animation_state_ == kShowing
? shelf_size
: ShelfConfig::Get()->hidden_shelf_in_screen_portion();
} else if (state.visibility_state == SHELF_HIDDEN ||
work_area->IsKeyboardShown()) {
shelf_in_screen_portion = 0;
......@@ -1789,6 +1791,13 @@ float ShelfLayoutManager::ComputeTargetOpacity(const State& state) const {
state.visibility_state == SHELF_VISIBLE) {
return 1.0f;
}
// The shelf should not become transparent during the animation to or from
// HomeLauncher.
if (chromeos::switches::ShouldShowShelfHotseat() && IsTabletModeEnabled() &&
home_launcher_animation_state_ != kFinished) {
return 1.0f;
}
// In Chrome OS Material Design, when shelf is hidden during auto hide state,
// target bounds are also hidden. So the window can extend to the edge of
// screen.
......
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