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 #ifndef UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 #include "ui/message_center/message_center_style.h" | 11 #include "ui/message_center/message_center_style.h" |
12 | 12 |
13 namespace message_center { | 13 namespace message_center { |
14 | 14 |
15 // The text background colors below are used only to keep | 15 // The text background colors below are used only to keep |
16 // view::Label from modifying the text color and will not actually be drawn. | 16 // view::Label from modifying the text color and will not actually be drawn. |
17 // See view::Label's RecalculateColors() for details. | 17 // See view::Label's RecalculateColors() for details. |
18 const SkColor kRegularTextBackgroundColor = SK_ColorWHITE; | 18 const SkColor kRegularTextBackgroundColor = SK_ColorWHITE; |
19 const SkColor kDimTextBackgroundColor = SK_ColorWHITE; | 19 const SkColor kDimTextBackgroundColor = SK_ColorWHITE; |
20 const SkColor kContextTextBackgroundColor = SK_ColorWHITE; | 20 const SkColor kContextTextBackgroundColor = SK_ColorWHITE; |
21 | 21 |
22 const int kIconSize = message_center::kNotificationIconSize; | 22 const int kIconSize = message_center::kNotificationIconSize; |
23 const int kLegacyIconSize = 40; | 23 const int kLegacyIconSize = 40; |
24 const int kTextLeftPadding = kIconSize + message_center::kIconToTextPadding; | |
Jun Mukai
2015/08/14 17:17:07
Please do not move views specific constants to gen
Miguel Garcia
2015/08/14 18:28:45
Ok, any advice on where to put them so they can be
Jun Mukai
2015/08/17 18:36:14
If they are shared among multiple platforms, ui/me
| |
25 const int kTextBottomPadding = 12; | 24 const int kTextBottomPadding = 12; |
26 const int kTextRightPadding = 23; | |
27 const int kItemTitleToMessagePadding = 3; | 25 const int kItemTitleToMessagePadding = 3; |
28 const int kButtonVecticalPadding = 0; | 26 const int kButtonVecticalPadding = 0; |
29 const int kButtonTitleTopPadding = 0; | 27 const int kButtonTitleTopPadding = 0; |
30 | 28 |
31 // Character limits: Displayed text will be subject to the line limits above, | 29 // Character limits: Displayed text will be subject to the line limits above, |
32 // but we also remove trailing characters from text to reduce processing cost. | 30 // but we also remove trailing characters from text to reduce processing cost. |
33 // Character limit = pixels per line * line limit / min. pixels per character. | 31 // Character limit = pixels per line * line limit / min. pixels per character. |
34 const int kMinPixelsPerTitleCharacter = 4; | 32 const int kMinPixelsPerTitleCharacter = 4; |
35 const size_t kMessageCharacterLimit = | 33 const size_t kMessageCharacterLimit = |
36 message_center::kNotificationWidth * | 34 message_center::kNotificationWidth * |
37 message_center::kMessageExpandedLineLimit / 3; | 35 message_center::kMessageExpandedLineLimit / 3; |
38 const size_t kContextMessageCharacterLimit = | 36 const size_t kContextMessageCharacterLimit = |
39 message_center::kNotificationWidth * | 37 message_center::kNotificationWidth * |
40 message_center::kContextMessageLineLimit / 3; | 38 message_center::kContextMessageLineLimit / 3; |
41 | 39 |
42 } // namespace message_center | 40 } // namespace message_center |
43 | 41 |
44 #endif // UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ | 42 #endif // UI_MESSAGE_CENTER_VIEWS_CONSTANTS_H_ |
OLD | NEW |