Commit cd52db37 authored by calamity's avatar calamity Committed by Commit bot

Remove 1 pixel padding around app list main view.

This CL removes the 1 pixel padding around the app list main view. This
subtly changes the layout of the app list by changing the padding of
certain elements.

The dimensions of the app list window are still the same.

This is being done in preparation for the new experimental app list
layout.

BUG=425444

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

Cr-Commit-Position: refs/heads/master@{#301073}
parent 6874f818
......@@ -80,7 +80,7 @@ const int kExperimentalPreferredRows = 4;
const int kReorderDroppingCircleRadius = 35;
// The padding around the outside of the experimental app list (top and sides).
const int kExperimentalWindowPadding = 23;
const int kExperimentalWindowPadding = 24;
// Max items allowed in a folder.
size_t kMaxFolderItems = 16;
......
......@@ -36,9 +36,6 @@ namespace app_list {
namespace {
// Border padding space around the bubble contents.
const int kPadding = 1;
// The maximum allowed time to wait for icon loading in milliseconds.
const int kMaxIconLoadingWaitTimeInMs = 50;
......@@ -113,9 +110,11 @@ AppListMainView::AppListMainView(AppListViewDelegate* delegate)
contents_view_(NULL),
contents_switcher_view_(NULL),
weak_ptr_factory_(this) {
SetBorder(
views::Border::CreateEmptyBorder(kPadding, kPadding, kPadding, kPadding));
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
SetLayoutManager(
new views::BoxLayout(views::BoxLayout::kVertical,
0,
0,
switches::IsExperimentalAppListEnabled() ? 0 : 1));
search_box_view_ = new SearchBoxView(this, delegate);
views::View* container = new SearchBoxContainerView(this, search_box_view_);
......
......@@ -60,8 +60,9 @@ namespace {
const int kDragBufferPx = 20;
// Padding space in pixels for fixed layout.
const int kLeftRightPadding = 23;
const int kTopPadding = 1;
const int kBottomPadding = 1;
const int kLeftRightPadding = 24;
// Padding space in pixels between pages.
const int kPagePadding = 40;
......@@ -71,7 +72,7 @@ const int kPreferredTileWidth = 88;
const int kPreferredTileHeight = 98;
const int kExperimentalPreferredTileWidth = 90;
const int kExperimentalPrefferedTileHeight = 90;
const int kExperimentalPreferredTileHeight = 90;
// Padding on each side of a tile.
const int kExperimentalTileLeftRightPadding = 15;
......@@ -106,7 +107,7 @@ const int kFolderDroppingCircleRadius = 39;
gfx::Size GetTileViewSize() {
return switches::IsExperimentalAppListEnabled()
? gfx::Size(kExperimentalPreferredTileWidth,
kExperimentalPrefferedTileHeight)
kExperimentalPreferredTileHeight)
: gfx::Size(kPreferredTileWidth, kPreferredTileHeight);
}
......@@ -424,11 +425,15 @@ void AppsGridView::SetLayout(int cols, int rows_per_page) {
cols_ = cols;
rows_per_page_ = rows_per_page;
SetBorder(views::Border::CreateEmptyBorder(
switches::IsExperimentalAppListEnabled() ? 0 : kTopPadding,
kLeftRightPadding,
0,
kLeftRightPadding));
if (switches::IsExperimentalAppListEnabled()) {
SetBorder(views::Border::CreateEmptyBorder(0,
kExperimentalWindowPadding,
kBottomPadding,
kExperimentalWindowPadding));
} else {
SetBorder(views::Border::CreateEmptyBorder(
kTopPadding, kLeftRightPadding, kBottomPadding, kLeftRightPadding));
}
}
void AppsGridView::ResetForShowApps() {
......
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