diff options
author | mgiuca <mgiuca@chromium.org> | 2014-08-31 19:24:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-01 02:26:14 +0000 |
commit | e322f3c3eae8adf9336efcf5c7923faac3528de5 (patch) | |
tree | 4204dddd2983412a4e38226730aeae1db549971e /ash | |
parent | fda1919dd58ba18f8ce217db6d4cb8f6e1778077 (diff) | |
download | chromium_src-e322f3c3eae8adf9336efcf5c7923faac3528de5.zip chromium_src-e322f3c3eae8adf9336efcf5c7923faac3528de5.tar.gz chromium_src-e322f3c3eae8adf9336efcf5c7923faac3528de5.tar.bz2 |
Make apps grid view scroll vertically in experimental app list.
Scrolling remains horizontal in the normal (and centered) app lists.
BUG=406222
TEST=Run with --enable-experimental-app-list --show-app-list. Apps grid
view should scroll vertically. Normal app list should still scroll
horizontally.
Review URL: https://codereview.chromium.org/491973004
Cr-Commit-Position: refs/heads/master@{#292826}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/app_list_controller.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc index 7e60edc..5159305 100644 --- a/ash/wm/app_list_controller.cc +++ b/ash/wm/app_list_controller.cc @@ -509,7 +509,12 @@ void AppListController::TransitionChanged() { const int shift = kMaxOverScrollShift * progress * dir; gfx::Rect shifted(view_bounds_); - shifted.set_x(shifted.x() + shift); + // Experimental app list scrolls vertically, so make the overscroll + // vertical. + if (app_list::switches::IsExperimentalAppListEnabled()) + shifted.set_y(shifted.y() + shift); + else + shifted.set_x(shifted.x() + shift); widget->SetBounds(shifted); should_snap_back_ = true; } else if (should_snap_back_) { |