| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 kTrayPopupMinWidth - (kNotificationIconWidth + kNotificationButtonWidth + | 80 kTrayPopupMinWidth - (kNotificationIconWidth + kNotificationButtonWidth + |
| 81 (kTrayPopupPaddingHorizontal / 2) * 3); | 81 (kTrayPopupPaddingHorizontal / 2) * 3); |
| 82 | 82 |
| 83 const int kMessageCenterBubblePadding = 4; | 83 const int kMessageCenterBubblePadding = 4; |
| 84 | 84 |
| 85 const int kTrayIconSize = 16; | 85 const int kTrayIconSize = 16; |
| 86 const SkColor kTrayIconColor = SK_ColorWHITE; | 86 const SkColor kTrayIconColor = SK_ColorWHITE; |
| 87 const int kMenuIconSize = 20; | 87 const int kMenuIconSize = 20; |
| 88 const SkColor kMenuIconColor = SkColorSetRGB(0x5A, 0x5A, 0x5A); | 88 const SkColor kMenuIconColor = SkColorSetRGB(0x5A, 0x5A, 0x5A); |
| 89 | 89 |
| 90 const int kHitRegionPadding = 4; |
| 91 const SkColor kSeparatorColor = SkColorSetA(SK_ColorWHITE, 0x3D); |
| 92 const int kSeparatorWidth = 1; |
| 93 |
| 90 int GetTrayConstant(TrayConstant constant) { | 94 int GetTrayConstant(TrayConstant constant) { |
| 91 const int kTrayItemHeightLegacy[] = {38, 38, kTrayItemSize}; | 95 const int kTrayItemHeightLegacy[] = {38, 38, kTrayItemSize}; |
| 92 const int kTraySpacing[] = {4, 4, 8}; | 96 const int kTraySpacing[] = {4, 4, 0}; |
| 93 const int kTrayPaddingFromEdgeOfShelf[] = {3, 3, 8}; | 97 const int kTrayPaddingFromEdgeOfShelf[] = {3, 3, 4}; |
| 94 const int kVirtualKeyboardButtonSize[] = {39, 39, kTrayItemSize}; | 98 const int kVirtualKeyboardButtonSize[] = {39, 39, kTrayItemSize}; |
| 95 | 99 |
| 96 const int mode = MaterialDesignController::GetMode(); | 100 const int mode = MaterialDesignController::GetMode(); |
| 97 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && | 101 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && |
| 98 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); | 102 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); |
| 99 | 103 |
| 100 switch (constant) { | 104 switch (constant) { |
| 101 case TRAY_ITEM_HEIGHT_LEGACY: | 105 case TRAY_ITEM_HEIGHT_LEGACY: |
| 102 return kTrayItemHeightLegacy[mode]; | 106 return kTrayItemHeightLegacy[mode]; |
| 103 case TRAY_SPACING: | 107 case TRAY_SPACING: |
| 104 return kTraySpacing[mode]; | 108 return kTraySpacing[mode]; |
| 105 case TRAY_PADDING_FROM_EDGE_OF_SHELF: | 109 case TRAY_PADDING_FROM_EDGE_OF_SHELF: |
| 106 return kTrayPaddingFromEdgeOfShelf[mode]; | 110 return kTrayPaddingFromEdgeOfShelf[mode]; |
| 107 case VIRTUAL_KEYBOARD_BUTTON_SIZE: | 111 case VIRTUAL_KEYBOARD_BUTTON_SIZE: |
| 108 return kVirtualKeyboardButtonSize[mode]; | 112 return kVirtualKeyboardButtonSize[mode]; |
| 109 } | 113 } |
| 110 NOTREACHED(); | 114 NOTREACHED(); |
| 111 return 0; | 115 return 0; |
| 112 } | 116 } |
| 113 | 117 |
| 114 } // namespace ash | 118 } // namespace ash |
| OLD | NEW |