| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/system/tray/tray_constants.h" | 5 #include "ash/common/system/tray/tray_constants.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const SkColor kBorderLightColor = SkColorSetRGB(0xeb, 0xeb, 0xeb); | 69 const SkColor kBorderLightColor = SkColorSetRGB(0xeb, 0xeb, 0xeb); |
| 70 const SkColor kButtonStrokeColor = SkColorSetRGB(0xdd, 0xdd, 0xdd); | 70 const SkColor kButtonStrokeColor = SkColorSetRGB(0xdd, 0xdd, 0xdd); |
| 71 | 71 |
| 72 const SkColor kHeaderTextColorNormal = SkColorSetARGB(0x7f, 0, 0, 0); | 72 const SkColor kHeaderTextColorNormal = SkColorSetARGB(0x7f, 0, 0, 0); |
| 73 const SkColor kHeaderTextColorHover = SkColorSetARGB(0xd3, 0, 0, 0); | 73 const SkColor kHeaderTextColorHover = SkColorSetARGB(0xd3, 0, 0, 0); |
| 74 | 74 |
| 75 const int kTrayPopupMinWidth = 300; | 75 const int kTrayPopupMinWidth = 300; |
| 76 const int kTrayPopupMaxWidth = 500; | 76 const int kTrayPopupMaxWidth = 500; |
| 77 const int kNotificationIconWidth = 40; | 77 const int kNotificationIconWidth = 40; |
| 78 const int kNotificationButtonWidth = 32; | 78 const int kNotificationButtonWidth = 32; |
| 79 const int kTrayNotificationContentsWidth = kTrayPopupMinWidth - | 79 const int kTrayNotificationContentsWidth = |
| 80 (kNotificationIconWidth + kNotificationButtonWidth + | 80 kTrayPopupMinWidth - (kNotificationIconWidth + kNotificationButtonWidth + |
| 81 (kTrayPopupPaddingHorizontal / 2) * 3); | 81 (kTrayPopupPaddingHorizontal / 2) * 3); |
| 82 | 82 |
| 83 const int kTrayAvatarCornerRadius = 2; | 83 const int kTrayAvatarCornerRadius = 2; |
| 84 const int kTrayAvatarSize = 32; | 84 const int kTrayAvatarSize = 32; |
| 85 | 85 |
| 86 const int kMessageCenterBubblePadding = 4; | 86 const int kMessageCenterBubblePadding = 4; |
| 87 const int kShelfItemHeight = 38; | 87 const int kShelfItemHeight = 38; |
| 88 | 88 |
| 89 // Items are 32 by 32 in the new Chrome OS MD requirements. | 89 // Items are 32 by 32 in the new Chrome OS MD requirements. |
| 90 const int kShelfItemSizeMD = 32; | 90 const int kShelfItemSizeMD = 32; |
| 91 | 91 |
| 92 int GetTrayConstant(TrayConstant constant) { | 92 int GetTrayConstant(TrayConstant constant) { |
| 93 const int kTraySpacing[] = {4, 4, 8}; | 93 const int kTraySpacing[] = {4, 4, 8}; |
| 94 const int kTrayPaddingFromEdgeOfShelf[] = {3, 3, 8}; | 94 const int kTrayPaddingFromEdgeOfShelf[] = {3, 3, 8}; |
| 95 | 95 |
| 96 const int mode = MaterialDesignController::GetMode(); | 96 const int mode = MaterialDesignController::GetMode(); |
| 97 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && | 97 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && |
| 98 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); | 98 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); |
| 99 | 99 |
| 100 switch (constant) { | 100 switch (constant) { |
| 101 case TRAY_SPACING: | 101 case TRAY_SPACING: |
| 102 return kTraySpacing[mode]; | 102 return kTraySpacing[mode]; |
| 103 case TRAY_PADDING_FROM_EDGE_OF_SHELF: | 103 case TRAY_PADDING_FROM_EDGE_OF_SHELF: |
| 104 return kTrayPaddingFromEdgeOfShelf[mode]; | 104 return kTrayPaddingFromEdgeOfShelf[mode]; |
| 105 } | 105 } |
| 106 NOTREACHED(); | 106 NOTREACHED(); |
| 107 return 0; | 107 return 0; |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace ash | 110 } // namespace ash |
| OLD | NEW |