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

Unified Diff: ash/common/shelf/shelf_constants.cc

Issue 1998933002: Update shelf spacing in Chrome OS according to the MD specs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from @tdanderson Created 4 years, 6 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
Index: ash/common/shelf/shelf_constants.cc
diff --git a/ash/common/shelf/shelf_constants.cc b/ash/common/shelf/shelf_constants.cc
index 5b6bf61cd71fdd5a11e9a5f77064b91a2d619455..ce4dac319419b2935695a317f293a2f8f7f47a2f 100644
--- a/ash/common/shelf/shelf_constants.cc
+++ b/ash/common/shelf/shelf_constants.cc
@@ -10,15 +10,19 @@
namespace ash {
const int kInvalidImageResourceID = -1;
-const int kShelfSize = 47;
-const int kShelfButtonSpacing = 10;
-const int kShelfButtonSize = 44;
const int kTimeToSwitchBackgroundMs = 1000;
+const int kWorkspaceAreaVisibleInset = 2;
+const int kWorkspaceAreaAutoHideInset = 5;
+const int kShelfAutoHideSize = 3;
+const int kShelfItemInset = 3;
const SkColor kShelfBaseColor = SK_ColorBLACK;
const SkColor kShelfIconColor = SK_ColorWHITE;
int GetShelfConstant(ShelfConstant shelf_constant) {
const int kShelfBackgroundAlpha[] = {204, 153, 153};
+ const int kShelfSize[] = {47, 48, 48};
+ const int kShelfButtonSpacing[] = {10, 16, 16};
+ const int kShelfButtonSize[] = {44, 48, 48};
const int mode = MaterialDesignController::GetMode();
DCHECK(mode >= MaterialDesignController::NON_MATERIAL &&
@@ -27,6 +31,12 @@ int GetShelfConstant(ShelfConstant shelf_constant) {
switch (shelf_constant) {
case SHELF_BACKGROUND_ALPHA:
return kShelfBackgroundAlpha[mode];
+ case SHELF_SIZE:
+ return kShelfSize[mode];
+ case SHELF_BUTTON_SPACING:
+ return kShelfButtonSpacing[mode];
+ case SHELF_BUTTON_SIZE:
+ return kShelfButtonSize[mode];
}
NOTREACHED();
return 0;

Powered by Google App Engine
This is Rietveld 408576698