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

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

Issue 162753002: Center and change the aspect ratio for the experimental app list. [Win] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile Created 6 years, 10 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_folder_view.cc ('k') | 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: 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 d9ad019114b628222cf9b6863e095865578de6d6..d75fd780e40a9d687c7b59ccfe3d65d3312fa2bd 100644
--- a/ui/app_list/views/apps_container_view.cc
+++ b/ui/app_list/views/apps_container_view.cc
@@ -6,8 +6,10 @@
#include <algorithm>
+#include "base/command_line.h"
#include "ui/app_list/app_list_constants.h"
#include "ui/app_list/app_list_folder_item.h"
+#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/pagination_model.h"
#include "ui/app_list/views/app_list_folder_view.h"
#include "ui/app_list/views/app_list_item_view.h"
@@ -27,9 +29,14 @@ AppsContainerView::AppsContainerView(AppListMainView* app_list_main_view,
top_icon_animation_pending_count_(0) {
apps_grid_view_ = new AppsGridView(
app_list_main_view, pagination_model, start_page_contents);
- apps_grid_view_->SetLayout(kPreferredIconDimension,
- kPreferredCols,
- kPreferredRows);
+ int cols = kPreferredCols;
+ int rows = kPreferredRows;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ app_list::switches::kEnableExperimentalAppList)) {
+ cols = kExperimentalPreferredCols;
+ rows = kExperimentalPreferredRows;
+ }
+ apps_grid_view_->SetLayout(kPreferredIconDimension, cols, rows);
AddChildView(apps_grid_view_);
folder_background_view_ = new FolderBackgroundView();
« no previous file with comments | « ui/app_list/views/app_list_folder_view.cc ('k') | ui/app_list/views/apps_grid_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698