OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shelf/shelf_constants.h" | 5 #include "ash/common/shelf/shelf_constants.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 | 9 |
10 namespace ash { | 10 namespace ash { |
11 | 11 |
12 const int kTimeToSwitchBackgroundMs = 1000; | 12 const int kTimeToSwitchBackgroundMs = 1000; |
13 const int kWorkspaceAreaVisibleInset = 2; | 13 const int kWorkspaceAreaVisibleInset = 2; |
14 const int kWorkspaceAreaAutoHideInset = 5; | 14 const int kWorkspaceAreaAutoHideInset = 5; |
15 const int kShelfAutoHideSize = 3; | 15 const int kShelfAutoHideSize = 3; |
16 const SkColor kShelfDefaultBaseColor = SK_ColorBLACK; | 16 const SkColor kShelfDefaultBaseColor = SK_ColorBLACK; |
17 const int kShelfButtonSize = 48; | 17 const int kShelfButtonSize = 48; |
18 const int kShelfButtonSpacing = 16; | 18 const int kShelfButtonSpacing = 16; |
19 const SkColor kShelfButtonActivatedHighlightColor = | 19 const SkColor kShelfButtonActivatedHighlightColor = |
20 SkColorSetA(SK_ColorWHITE, 100); | 20 SkColorSetA(SK_ColorWHITE, 100); |
21 const SkColor kShelfInkDropBaseColor = SK_ColorWHITE; | 21 const SkColor kShelfInkDropBaseColor = SK_ColorWHITE; |
22 const float kShelfInkDropVisibleOpacity = 0.2f; | 22 const float kShelfInkDropVisibleOpacity = 0.2f; |
23 const SkColor kShelfIconColor = SK_ColorWHITE; | 23 const SkColor kShelfIconColor = SK_ColorWHITE; |
24 const int kShelfTranslucentAlpha = 153; | 24 const int kShelfTranslucentAlpha = 153; |
25 const int kShelfTranslucentColorDarkenAlpha = 102; | 25 const int kShelfTranslucentColorDarkenAlpha = 102; |
26 const int kShelfOpaqueColorDarkenAlpha = 230; | 26 const int kShelfOpaqueColorDarkenAlpha = 178; |
27 const int kOverflowButtonSize = 32; | 27 const int kOverflowButtonSize = 32; |
28 const int kOverflowButtonCornerRadius = 2; | 28 const int kOverflowButtonCornerRadius = 2; |
29 const int kAppListButtonRadius = kOverflowButtonSize / 2; | 29 const int kAppListButtonRadius = kOverflowButtonSize / 2; |
30 | 30 |
31 int GetShelfConstant(ShelfConstant shelf_constant) { | 31 int GetShelfConstant(ShelfConstant shelf_constant) { |
32 const int kShelfSize[] = {47, 48, 48}; | 32 const int kShelfSize[] = {47, 48, 48}; |
33 const int kShelfInsetsForAutoHide[] = {3, 0, 0}; | 33 const int kShelfInsetsForAutoHide[] = {3, 0, 0}; |
34 | 34 |
35 // TODO(estade): clean this up --- remove unneeded constants and reduce | 35 // TODO(estade): clean this up --- remove unneeded constants and reduce |
36 // remaining arrays to a single constant. | 36 // remaining arrays to a single constant. |
37 const int mode = 1; | 37 const int mode = 1; |
38 switch (shelf_constant) { | 38 switch (shelf_constant) { |
39 case SHELF_SIZE: | 39 case SHELF_SIZE: |
40 return kShelfSize[mode]; | 40 return kShelfSize[mode]; |
41 case SHELF_INSETS_FOR_AUTO_HIDE: | 41 case SHELF_INSETS_FOR_AUTO_HIDE: |
42 return kShelfInsetsForAutoHide[mode]; | 42 return kShelfInsetsForAutoHide[mode]; |
43 } | 43 } |
44 NOTREACHED(); | 44 NOTREACHED(); |
45 return 0; | 45 return 0; |
46 } | 46 } |
47 | 47 |
48 } // namespace ash | 48 } // namespace ash |
OLD | NEW |