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" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
10 #include "ui/gfx/color_palette.h" | 9 #include "ui/gfx/color_palette.h" |
11 | 10 |
12 namespace ash { | 11 namespace ash { |
13 | 12 |
14 const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7; | 13 const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7; |
15 const int kPaddingFromBottomOfScreenBottomAlignment = 7; | 14 const int kPaddingFromBottomOfScreenBottomAlignment = 7; |
16 const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8; | 15 const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8; |
17 const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9; | 16 const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 const int kTrayPopupItemLeftInset[] = {0, 4, 4}; | 121 const int kTrayPopupItemLeftInset[] = {0, 4, 4}; |
123 const int kTrayPopupItemRightInset[] = {0, 0, 0}; | 122 const int kTrayPopupItemRightInset[] = {0, 0, 0}; |
124 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48}; | 123 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48}; |
125 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40}; | 124 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40}; |
126 const int kTrayPopupTransitionToDefaultViewDelayMs[] = {0, 100, 100}; | 125 const int kTrayPopupTransitionToDefaultViewDelayMs[] = {0, 100, 100}; |
127 const int kTrayPopupTransitionToDetailedViewDelayMs[] = {0, 100, 100}; | 126 const int kTrayPopupTransitionToDetailedViewDelayMs[] = {0, 100, 100}; |
128 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize}; | 127 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize}; |
129 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize}; | 128 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize}; |
130 const int kTrayImageItemPadding[] = {1, 3, 3}; | 129 const int kTrayImageItemPadding[] = {1, 3, 3}; |
131 | 130 |
132 const int mode = MaterialDesignController::GetMode(); | 131 // FIXME |
tdanderson
2017/02/13 17:36:28
ditto to previous comment in shelf_constants
Evan Stade
2017/02/13 19:29:42
Done.
| |
133 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && | 132 const int mode = 1; |
134 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); | |
135 | |
136 switch (constant) { | 133 switch (constant) { |
137 case TRAY_ITEM_HEIGHT_LEGACY: | 134 case TRAY_ITEM_HEIGHT_LEGACY: |
138 return kTrayItemHeightLegacy[mode]; | 135 return kTrayItemHeightLegacy[mode]; |
139 case TRAY_SPACING: | 136 case TRAY_SPACING: |
140 return kTraySpacing[mode]; | 137 return kTraySpacing[mode]; |
141 case TRAY_PADDING_FROM_EDGE_OF_SHELF: | 138 case TRAY_PADDING_FROM_EDGE_OF_SHELF: |
142 return kTrayPaddingFromEdgeOfShelf[mode]; | 139 return kTrayPaddingFromEdgeOfShelf[mode]; |
143 case TRAY_POPUP_ITEM_MIN_HEIGHT: | 140 case TRAY_POPUP_ITEM_MIN_HEIGHT: |
144 return kTrayPopupItemMinHeight[mode]; | 141 return kTrayPopupItemMinHeight[mode]; |
145 case TRAY_POPUP_ITEM_MAX_HEIGHT: | 142 case TRAY_POPUP_ITEM_MAX_HEIGHT: |
(...skipping 21 matching lines...) Expand all Loading... | |
167 case TRAY_IME_MENU_ICON: | 164 case TRAY_IME_MENU_ICON: |
168 return kTrayImeMenuIcon[mode]; | 165 return kTrayImeMenuIcon[mode]; |
169 case TRAY_IMAGE_ITEM_PADDING: | 166 case TRAY_IMAGE_ITEM_PADDING: |
170 return kTrayImageItemPadding[mode]; | 167 return kTrayImageItemPadding[mode]; |
171 } | 168 } |
172 NOTREACHED(); | 169 NOTREACHED(); |
173 return 0; | 170 return 0; |
174 } | 171 } |
175 | 172 |
176 } // namespace ash | 173 } // namespace ash |
OLD | NEW |