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

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

Issue 573703003: Make experimental app launcher show 4 rows of apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dragging_without_grid_resize
Patch Set: address comments Created 6 years, 3 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 | « ui/app_list/views/app_list_view_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/apps_container_view.cc
diff --git a/ui/app_list/views/apps_container_view.cc b/ui/app_list/views/apps_container_view.cc
index 4d6fdaba35dd99961639d1c1970218efaf9edf9f..b026a3ed4ed728d8774e4f7f04a88ae5066a6b8f 100644
--- a/ui/app_list/views/apps_container_view.cc
+++ b/ui/app_list/views/apps_container_view.cc
@@ -26,12 +26,17 @@ AppsContainerView::AppsContainerView(AppListMainView* app_list_main_view,
show_state_(SHOW_NONE),
top_icon_animation_pending_count_(0) {
apps_grid_view_ = new AppsGridView(app_list_main_view);
- int cols = kPreferredCols;
- int rows = kPreferredRows;
- // ShouldCenterWindow also implies that it is wide instead of tall.
- if (app_list_main_view->ShouldCenterWindow()) {
+ int cols;
+ int rows;
+ if (switches::IsExperimentalAppListEnabled()) {
cols = kExperimentalPreferredCols;
rows = kExperimentalPreferredRows;
+ } else if (app_list_main_view->ShouldCenterWindow()) {
+ cols = kCenteredPreferredCols;
+ rows = kCenteredPreferredRows;
+ } else {
+ cols = kPreferredCols;
+ rows = kPreferredRows;
}
apps_grid_view_->SetLayout(cols, rows);
AddChildView(apps_grid_view_);
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698