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

Unified Diff: ash/common/system/tray/tray_constants.cc

Issue 2414103003: Added common layout framework for system menu rows. (Closed)
Patch Set: Merge branch 'master' into md_system_menu_layout_mgr Created 4 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
Index: ash/common/system/tray/tray_constants.cc
diff --git a/ash/common/system/tray/tray_constants.cc b/ash/common/system/tray/tray_constants.cc
index 11923f03d1e071e938c11be1b08c5dffceec604f..9e20caa1da71ccccb5c5a0ed705d224ead5c8139 100644
--- a/ash/common/system/tray/tray_constants.cc
+++ b/ash/common/system/tray/tray_constants.cc
@@ -96,6 +96,14 @@ int GetTrayConstant(TrayConstant constant) {
const int kTraySpacing[] = {4, 4, 0};
const int kTrayPaddingFromEdgeOfShelf[] = {3, 3, 4};
const int kTrayPopupItemHeight[] = {46, 46, 48};
+ // TODO(bruthig): Use the correct values for non-material design.
+ const int kTrayPopupItemLeftInset[] = {0, 0, 4};
+ // TODO(bruthig): Use the correct values for non-material design.
+ const int kTrayPopupItemRightInset[] = {0, 0, 4};
+ // TODO(bruthig): Use the correct values for non-material design.
+ const int kTrayPopupItemMinStartWidth[] = {48, 48, 48};
+ // TODO(bruthig): Use the correct values for non-material design.
+ const int kTrayPopupItemMinEndWidth[] = {48, 48, 48};
tdanderson 2016/10/19 18:31:00 optional: share 48 with kMenuButtonSize
bruthig 2016/10/20 04:40:13 These will get reworked in a follow-up CL.
tdanderson 2016/10/20 18:16:49 Acknowledged.
const int kVirtualKeyboardButtonSize[] = {39, 39, kTrayItemSize};
const int kTrayImeMenuIcon[] = {40, 40, kTrayItemSize};
const int kTrayImageItemPadding[] = {1, 1, 3};
@@ -113,6 +121,14 @@ int GetTrayConstant(TrayConstant constant) {
return kTrayPaddingFromEdgeOfShelf[mode];
case TRAY_POPUP_ITEM_HEIGHT:
return kTrayPopupItemHeight[mode];
+ case TRAY_POPUP_ITEM_LEFT_INSET:
+ return kTrayPopupItemLeftInset[mode];
+ case TRAY_POPUP_ITEM_RIGHT_INSET:
+ return kTrayPopupItemRightInset[mode];
+ case TRAY_POPUP_ITEM_MIN_START_WIDTH:
+ return kTrayPopupItemMinStartWidth[mode];
+ case TRAY_POPUP_ITEM_MIN_END_WIDTH:
+ return kTrayPopupItemMinEndWidth[mode];
case VIRTUAL_KEYBOARD_BUTTON_SIZE:
return kVirtualKeyboardButtonSize[mode];
case TRAY_IME_MENU_ICON:

Powered by Google App Engine
This is Rietveld 408576698