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

Fix the issue of wrong layout after tablet-clamshell transition

This bug was introduced by my previous CL (https://crrev.com/c/1811183).
In that CL, calculating the edge padding was put before the update of
layout strategy. In this CL, replacing the check on layout strategy with
calling CanFitAllAppsWithoutScrolling.

Bug: 1006379
Change-Id: I74b6e0f85662d1c5c31cdbe0d1139357000a3321
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1828060Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700413}
parent 3ea91c48
...@@ -715,7 +715,7 @@ gfx::Insets ScrollableShelfView::CalculateEdgePadding() const { ...@@ -715,7 +715,7 @@ gfx::Insets ScrollableShelfView::CalculateEdgePadding() const {
2 * ShelfConfig::Get()->app_icon_group_margin(); 2 * ShelfConfig::Get()->app_icon_group_margin();
int gap = int gap =
layout_strategy_ == kNotShowArrowButtons CanFitAllAppsWithoutScrolling()
? available_size_for_app_icons - icons_size // shelf centering ? available_size_for_app_icons - icons_size // shelf centering
: CalculateOverflowPadding(available_size_for_app_icons); // overflow : CalculateOverflowPadding(available_size_for_app_icons); // overflow
......
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