| 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 #include "ui/gfx/color_palette.h" | 10 #include "ui/gfx/color_palette.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 const int kTrayPopupItemMinHeight[] = {46, 48, 48}; | 110 const int kTrayPopupItemMinHeight[] = {46, 48, 48}; |
| 111 const int kTrayPopupItemMaxHeight[] = {138, 144, 144}; | 111 const int kTrayPopupItemMaxHeight[] = {138, 144, 144}; |
| 112 // FixedSizedImageViews use the contained ImageView's width for 0 values. | 112 // FixedSizedImageViews use the contained ImageView's width for 0 values. |
| 113 const int kTrayPopupItemMainImageRegionWidth[] = {0, 48, 48}; | 113 const int kTrayPopupItemMainImageRegionWidth[] = {0, 48, 48}; |
| 114 const int kTrayPopupItemMoreImageSize[] = {25, kMenuIconSize, kMenuIconSize}; | 114 const int kTrayPopupItemMoreImageSize[] = {25, kMenuIconSize, kMenuIconSize}; |
| 115 const int kTrayPopupItemMoreRegionHorizontalInset[] = {10, 10, 10}; | 115 const int kTrayPopupItemMoreRegionHorizontalInset[] = {10, 10, 10}; |
| 116 const int kTrayPopupItemLeftInset[] = {0, 4, 4}; | 116 const int kTrayPopupItemLeftInset[] = {0, 4, 4}; |
| 117 const int kTrayPopupItemRightInset[] = {0, 0, 0}; | 117 const int kTrayPopupItemRightInset[] = {0, 0, 0}; |
| 118 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48}; | 118 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48}; |
| 119 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40}; | 119 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40}; |
| 120 const int kTrayPopupTransitionToDefaultViewDelayMs[] = {0, 80, 100}; |
| 121 const int kTrayPopupTransitionToDetailedViewDelayMs[] = {0, 80, 100}; |
| 120 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize}; | 122 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize}; |
| 121 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize}; | 123 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize}; |
| 122 const int kTrayImageItemPadding[] = {1, 3, 3}; | 124 const int kTrayImageItemPadding[] = {1, 3, 3}; |
| 123 | 125 |
| 124 const int mode = MaterialDesignController::GetMode(); | 126 const int mode = MaterialDesignController::GetMode(); |
| 125 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && | 127 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && |
| 126 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); | 128 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); |
| 127 | 129 |
| 128 switch (constant) { | 130 switch (constant) { |
| 129 case TRAY_ITEM_HEIGHT_LEGACY: | 131 case TRAY_ITEM_HEIGHT_LEGACY: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 143 case TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET: | 145 case TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET: |
| 144 return kTrayPopupItemMoreRegionHorizontalInset[mode]; | 146 return kTrayPopupItemMoreRegionHorizontalInset[mode]; |
| 145 case TRAY_POPUP_ITEM_LEFT_INSET: | 147 case TRAY_POPUP_ITEM_LEFT_INSET: |
| 146 return kTrayPopupItemLeftInset[mode]; | 148 return kTrayPopupItemLeftInset[mode]; |
| 147 case TRAY_POPUP_ITEM_RIGHT_INSET: | 149 case TRAY_POPUP_ITEM_RIGHT_INSET: |
| 148 return kTrayPopupItemRightInset[mode]; | 150 return kTrayPopupItemRightInset[mode]; |
| 149 case TRAY_POPUP_ITEM_MIN_START_WIDTH: | 151 case TRAY_POPUP_ITEM_MIN_START_WIDTH: |
| 150 return kTrayPopupItemMinStartWidth[mode]; | 152 return kTrayPopupItemMinStartWidth[mode]; |
| 151 case TRAY_POPUP_ITEM_MIN_END_WIDTH: | 153 case TRAY_POPUP_ITEM_MIN_END_WIDTH: |
| 152 return kTrayPopupItemMinEndWidth[mode]; | 154 return kTrayPopupItemMinEndWidth[mode]; |
| 155 case TRAY_POPUP_TRANSITION_TO_DEFAULT_DELAY: |
| 156 return kTrayPopupTransitionToDefaultViewDelayMs[mode]; |
| 157 case TRAY_POPUP_TRANSITION_TO_DETAILED_DELAY: |
| 158 return kTrayPopupTransitionToDetailedViewDelayMs[mode]; |
| 153 case VIRTUAL_KEYBOARD_BUTTON_SIZE: | 159 case VIRTUAL_KEYBOARD_BUTTON_SIZE: |
| 154 return kVirtualKeyboardButtonSize[mode]; | 160 return kVirtualKeyboardButtonSize[mode]; |
| 155 case TRAY_IME_MENU_ICON: | 161 case TRAY_IME_MENU_ICON: |
| 156 return kTrayImeMenuIcon[mode]; | 162 return kTrayImeMenuIcon[mode]; |
| 157 case TRAY_IMAGE_ITEM_PADDING: | 163 case TRAY_IMAGE_ITEM_PADDING: |
| 158 return kTrayImageItemPadding[mode]; | 164 return kTrayImageItemPadding[mode]; |
| 159 } | 165 } |
| 160 NOTREACHED(); | 166 NOTREACHED(); |
| 161 return 0; | 167 return 0; |
| 162 } | 168 } |
| 163 | 169 |
| 164 } // namespace ash | 170 } // namespace ash |
| OLD | NEW |