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

Fix wrong layout in login shelf view

ShelfWidget's bounds are offset to leave space for the navigation
widget even when the login shelf shows. It leads to the wrong layout
of the login shelf. This CL fixes such an issue.


Bug: 994424
Change-Id: I2f422e2a53e7d40f76ebbbb53204e1619ccc95e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1811642Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697815}
parent 17319fd6
...@@ -1419,7 +1419,8 @@ void ShelfLayoutManager::CalculateTargetBounds( ...@@ -1419,7 +1419,8 @@ void ShelfLayoutManager::CalculateTargetBounds(
// This needs to happen after calling UpdateTargetBoundsForGesture(), because // This needs to happen after calling UpdateTargetBoundsForGesture(), because
// that can change the size of the shelf. // that can change the size of the shelf.
if (chromeos::switches::ShouldShowScrollableShelf()) { const bool showing_login_shelf = !state.IsActiveSessionState();
if (chromeos::switches::ShouldShowScrollableShelf() && !showing_login_shelf) {
target_bounds->shelf_bounds_in_shelf = SelectValueForShelfAlignment( target_bounds->shelf_bounds_in_shelf = SelectValueForShelfAlignment(
gfx::Rect(target_bounds->nav_bounds_in_shelf.right(), 0, gfx::Rect(target_bounds->nav_bounds_in_shelf.right(), 0,
shelf_width - status_size.width() - shelf_width - status_size.width() -
......
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