Chromium Code Reviews| Index: ash/system/tray/tray_constants.cc |
| diff --git a/ash/system/tray/tray_constants.cc b/ash/system/tray/tray_constants.cc |
| index 8557e2e38f2a5888371a9fe38d0c03701522922f..bc2bed14eb43e46307705e86cc8df6e719f49906 100644 |
| --- a/ash/system/tray/tray_constants.cc |
| +++ b/ash/system/tray/tray_constants.cc |
| @@ -5,6 +5,8 @@ |
| #include "ash/system/tray/tray_constants.h" |
| #include "ash/ash_switches.h" |
| +#include "ash/material_design/material_design_controller.h" |
| +#include "base/logging.h" |
| #include "third_party/skia/include/core/SkColor.h" |
| namespace ash { |
| @@ -21,7 +23,8 @@ const int kBubblePaddingHorizontalSide = 10; |
| const int kBubblePaddingVerticalBottom = 3; |
| const int kBubblePaddingVerticalSide = 15; |
| -const int kPaddingFromEdgeOfShelf = 3; |
| +// Padding used to adjust the size of status tray dark background. |
| +const int kAdjustBackgroundPadding = 3; |
| // Top inset of system tray bubble for bottom anchor alignment. |
| const int kTrayBubbleAnchorTopInsetBottomAnchor = 3; |
| @@ -81,7 +84,27 @@ const int kTrayNotificationContentsWidth = kTrayPopupMinWidth - |
| const int kTrayAvatarCornerRadius = 2; |
| const int kTrayAvatarSize = 32; |
| -const int kTraySpacing = 4; |
| +const int kMessageCenterBubblePadding = 4; |
| const int kShelfItemHeight = 38; |
| +const int kOverviewButtonIndex = 0; |
| + |
| +// static |
|
tdanderson
2016/06/03 19:25:24
nit: remove this if the function isn't static
yiyix
2016/06/10 19:26:05
Sorry, I copied this over from another function
|
| +int GetTrayConstant(ShelfStatusAreaInset constant) { |
| + const int kTraySpacing[] = {4, 2}; |
| + const int kPaddingFromEdgeOfShelf[] = {3, 5}; |
| + |
| + int mode = MaterialDesignController::IsShelfMaterial() |
| + ? MaterialDesignController::Mode::MATERIAL_NORMAL |
| + : MaterialDesignController::Mode::NON_MATERIAL; |
| + |
| + switch (constant) { |
| + case TRAY_SPACING: |
| + return kTraySpacing[mode]; |
| + case PADDING_FROM_EDGE_OF_SHELF: |
| + return kPaddingFromEdgeOfShelf[mode]; |
| + } |
| + NOTREACHED(); |
| + return 0; |
| +} |
| } // namespace ash |