Skip to content

Commit

Permalink
Fix wrong layout in login shelf view
Browse files Browse the repository at this point in the history
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/+/1811642
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697815}
  • Loading branch information
Andrew Xu authored and Commit Bot committed Sep 18, 2019
1 parent 17319fd commit bb01bb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ash/shelf/shelf_layout_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,8 @@ void ShelfLayoutManager::CalculateTargetBounds(

// This needs to happen after calling UpdateTargetBoundsForGesture(), because
// 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(
gfx::Rect(target_bounds->nav_bounds_in_shelf.right(), 0,
shelf_width - status_size.width() -
Expand Down

0 comments on commit bb01bb3

Please sign in to comment.