Commit 2a4dc1da authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

app_list: set all apps indicator negative transition offset limit

changes:
Set all apps indicator negative transition offset limit to the place of
initial suggested apps indicator.
This will make:
(1) when scrolling up, all apps indicator will stop at 21px padding
away from search box, while all apps tiles scrolling underneath it.
(2) all apps indicator will be shown on non-first page due to (1).

Bug: 741009
TEST: tested with fullscreen app list enabled
Change-Id: I7fa71f041f81b0939c507fb246589cfdb6dbc06a
Reviewed-on: https://chromium-review.googlesource.com/569378Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486230}
parent b5161efc
...@@ -896,7 +896,10 @@ void AppsGridView::LayoutAllAppsIndicator(gfx::Rect* rect) { ...@@ -896,7 +896,10 @@ void AppsGridView::LayoutAllAppsIndicator(gfx::Rect* rect) {
indicator_rect.Inset((indicator_rect.width() - indicator_size.width()) / 2, indicator_rect.Inset((indicator_rect.width() - indicator_size.width()) / 2,
0); 0);
const gfx::Vector2d page_zero_offset = CalculateTransitionOffset(0); const gfx::Vector2d page_zero_offset = CalculateTransitionOffset(0);
indicator_rect.Offset(page_zero_offset.x(), page_zero_offset.y()); const int y_offset_limit = -kSuggestionsAllAppsIndicatorPadding -
kGridTileHeight - indicator_size.height();
indicator_rect.Offset(page_zero_offset.x(),
std::max(y_offset_limit, page_zero_offset.y()));
all_apps_indicator_->SetBoundsRect(indicator_rect); all_apps_indicator_->SetBoundsRect(indicator_rect);
} }
......
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