Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2528)

Unified Diff: ash/wm/app_list_controller.cc

Issue 491973004: Make apps grid view scroll vertically in experimental app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@calamity-ares-vertical-scroll
Patch Set: Rename width to size. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/app_list_controller.cc
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index 7e60edc5bbdf8c71f2ab4061ddf9d28b8a0b68cc..515930507524e271db77b1229ca0f4c2a70ea10a 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_) {
« no previous file with comments | « no previous file | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698