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

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

Issue 676513003: Remove 1 pixel padding around app list main view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/call_add_contents_view_later
Patch Set: switched constants Created 6 years, 2 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_main_view.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_grid_view.cc
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index 22b7fd97237393262ff49957a89cb5a1965b46b7..764ba014d14d5233310d9eb97e70ae0f479ecc24 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -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() {
« no previous file with comments | « ui/app_list/views/app_list_main_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698