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

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

Issue 2468533002: [ash-md] Applied Material Design layout to TrayItemMore system menu rows. (Closed)
Patch Set: Merge branch 'master' into md_system_menu_tray_item_more_layout Created 4 years, 1 month 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 2cfd4cdb1d18728aa98f6c6d6c1ebca113dc40b0..775206c1f53ffc205d4545fbebd4153e39b6dc5f 100644
--- a/ash/common/system/tray/tray_constants.cc
+++ b/ash/common/system/tray/tray_constants.cc
@@ -53,6 +53,8 @@ const SkColor kTrayPopupHoverBackgroundColor = SkColorSetRGB(0xe4, 0xe4, 0xe4);
const int kTrayPopupScrollSeparatorHeight = 15;
const int kTrayRoundedBorderRadius = 2;
+const int kTrayPopupLabelHorizontalPadding = 4;
tdanderson 2016/11/01 18:59:43 I think this may be a duplicate of kTrayPopupTextS
bruthig 2016/11/01 23:00:43 kTrayPopupTextSpacingVertical doesn't appear to be
+
const SkColor kBackgroundColor = SkColorSetRGB(0xfe, 0xfe, 0xfe);
const SkColor kHoverBackgroundColor = SkColorSetRGB(0xf3, 0xf3, 0xf3);
const SkColor kPublicAccountBackgroundColor = SkColorSetRGB(0xf8, 0xe5, 0xb6);
@@ -101,15 +103,15 @@ int GetTrayConstant(TrayConstant constant) {
const int kTrayItemHeightLegacy[] = {38, 38, kTrayItemSize};
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 kTrayPopupItemHeight[] = {46, 48, 48};
tdanderson 2016/11/01 18:59:44 Note that since these arrays have the form {a, b,
bruthig 2016/11/01 23:00:43 Acknowledged.
+ // FixedSizedImageViews use the contained ImageView's width for 0 values.
+ const int kTrayPopupItemMainImageRegionWidth[] = {0, 48, 48};
+ // FixedSizedImageViews use the contained ImageView's width for 0 values.
+ const int kTrayPopupItemMoreImageRegionWidth[] = {0, 20, 20};
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};
+ const int kTrayPopupItemRightInset[] = {0, 0, 0};
+ const int kTrayPopupItemMinStartWidth[] = {46, 48, 48};
+ const int kTrayPopupItemMinEndWidth[] = {40, 40, 40};
const int kVirtualKeyboardButtonSize[] = {39, 39, kTrayItemSize};
const int kTrayImeMenuIcon[] = {40, 40, kTrayItemSize};
const int kTrayImageItemPadding[] = {1, 1, 3};
@@ -127,6 +129,10 @@ int GetTrayConstant(TrayConstant constant) {
return kTrayPaddingFromEdgeOfShelf[mode];
case TRAY_POPUP_ITEM_HEIGHT:
return kTrayPopupItemHeight[mode];
+ case TRAY_POPUP_ITEM_MAIN_IMAGE_CONTAINER_WIDTH:
+ return kTrayPopupItemMainImageRegionWidth[mode];
+ case TRAY_POPUP_ITEM_MORE_IMAGE_CONTAINER_WIDTH:
+ return kTrayPopupItemMoreImageRegionWidth[mode];
case TRAY_POPUP_ITEM_LEFT_INSET:
return kTrayPopupItemLeftInset[mode];
case TRAY_POPUP_ITEM_RIGHT_INSET:

Powered by Google App Engine
This is Rietveld 408576698