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

Unified Diff: ui/app_list/views/contents_view.cc

Issue 504033002: Make app list ContentsView scroll vertically in experimental app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address nit 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/contents_view.cc
diff --git a/ui/app_list/views/contents_view.cc b/ui/app_list/views/contents_view.cc
index 997c6c3b5fcdf8fcd32652d635f0a9b2199c5f47..e6ae0a847c6114b7700cba88486a2344bf539f39 100644
--- a/ui/app_list/views/contents_view.cc
+++ b/ui/app_list/views/contents_view.cc
@@ -215,23 +215,13 @@ void ContentsView::UpdatePageBounds() {
gfx::Rect outgoing_target(rect);
int dir = target_page > current_page ? -1 : 1;
- if (app_list::switches::IsExperimentalAppListEnabled()) {
- // The experimental app list transitions horizontally.
- int page_width = rect.width();
- int transition_offset = progress * page_width * dir;
-
- outgoing_target.set_x(transition_offset);
- incoming_target.set_x(dir < 0 ? transition_offset + page_width
- : transition_offset - page_width);
- } else {
- // The normal app list transitions vertically.
- int page_height = rect.height();
- int transition_offset = progress * page_height * dir;
+ // Pages transition vertically.
+ int page_height = rect.height();
+ int transition_offset = progress * page_height * dir;
- outgoing_target.set_y(transition_offset);
- incoming_target.set_y(dir < 0 ? transition_offset + page_height
- : transition_offset - page_height);
- }
+ outgoing_target.set_y(transition_offset);
+ incoming_target.set_y(dir < 0 ? transition_offset + page_height
+ : transition_offset - page_height);
view_model_->view_at(current_page)->SetBoundsRect(outgoing_target);
view_model_->view_at(target_page)->SetBoundsRect(incoming_target);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698