Commit 484f52d6 authored by calamity's avatar calamity Committed by Commit bot

Make experimental app launcher show 4 rows of apps.

This CL changes the number of rows in the experimental app launcher's
grid view from 3 to 4.

BUG=411775

Review URL: https://codereview.chromium.org/573703003

Cr-Commit-Position: refs/heads/master@{#295026}
parent a7cb6bf9
...@@ -67,9 +67,13 @@ const int kGridIconDimension = 48; ...@@ -67,9 +67,13 @@ const int kGridIconDimension = 48;
const int kListIconSize = 32; const int kListIconSize = 32;
const int kTileIconSize = 48; const int kTileIconSize = 48;
// Preferred number of columns and rows in the centered app list apps grid.
const int kCenteredPreferredCols = 6;
const int kCenteredPreferredRows = 3;
// Preferred number of columns and rows in the experimental app list apps grid. // Preferred number of columns and rows in the experimental app list apps grid.
const int kExperimentalPreferredCols = 6; const int kExperimentalPreferredCols = 6;
const int kExperimentalPreferredRows = 3; const int kExperimentalPreferredRows = 4;
// Radius of the circle, in which if entered, show re-order preview. // Radius of the circle, in which if entered, show re-order preview.
const int kReorderDroppingCircleRadius = 35; const int kReorderDroppingCircleRadius = 35;
......
...@@ -51,6 +51,9 @@ APP_LIST_EXPORT extern const int kGridIconDimension; ...@@ -51,6 +51,9 @@ APP_LIST_EXPORT extern const int kGridIconDimension;
APP_LIST_EXPORT extern const int kListIconSize; APP_LIST_EXPORT extern const int kListIconSize;
APP_LIST_EXPORT extern const int kTileIconSize; APP_LIST_EXPORT extern const int kTileIconSize;
APP_LIST_EXPORT extern const int kCenteredPreferredCols;
APP_LIST_EXPORT extern const int kCenteredPreferredRows;
APP_LIST_EXPORT extern const int kExperimentalPreferredCols; APP_LIST_EXPORT extern const int kExperimentalPreferredCols;
APP_LIST_EXPORT extern const int kExperimentalPreferredRows; APP_LIST_EXPORT extern const int kExperimentalPreferredRows;
......
...@@ -238,6 +238,13 @@ void AppListViewTestContext::RunDisplayTest() { ...@@ -238,6 +238,13 @@ void AppListViewTestContext::RunDisplayTest() {
delegate_->GetTestModel()->PopulateApps(kInitialItems); delegate_->GetTestModel()->PopulateApps(kInitialItems);
Show(); Show();
// The landscape app launcher needs to be short enough to accomodate the
// virtual keyboard because it is enabled by default when the virtual keyboard
// is enabled.
if (test_type_ == LANDSCAPE)
EXPECT_GE(403, view_->bounds().height());
if (is_landscape()) if (is_landscape())
EXPECT_EQ(2, GetPaginationModel()->total_pages()); EXPECT_EQ(2, GetPaginationModel()->total_pages());
else else
......
...@@ -26,12 +26,17 @@ AppsContainerView::AppsContainerView(AppListMainView* app_list_main_view, ...@@ -26,12 +26,17 @@ AppsContainerView::AppsContainerView(AppListMainView* app_list_main_view,
show_state_(SHOW_NONE), show_state_(SHOW_NONE),
top_icon_animation_pending_count_(0) { top_icon_animation_pending_count_(0) {
apps_grid_view_ = new AppsGridView(app_list_main_view); apps_grid_view_ = new AppsGridView(app_list_main_view);
int cols = kPreferredCols; int cols;
int rows = kPreferredRows; int rows;
// ShouldCenterWindow also implies that it is wide instead of tall. if (switches::IsExperimentalAppListEnabled()) {
if (app_list_main_view->ShouldCenterWindow()) {
cols = kExperimentalPreferredCols; cols = kExperimentalPreferredCols;
rows = kExperimentalPreferredRows; rows = kExperimentalPreferredRows;
} else if (app_list_main_view->ShouldCenterWindow()) {
cols = kCenteredPreferredCols;
rows = kCenteredPreferredRows;
} else {
cols = kPreferredCols;
rows = kPreferredRows;
} }
apps_grid_view_->SetLayout(cols, rows); apps_grid_view_->SetLayout(cols, rows);
AddChildView(apps_grid_view_); AddChildView(apps_grid_view_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment