Add ICU message format support
[chromium-blink-merge.git] / ui / message_center / message_center_style.h
blob6622b3fc6abfd38a408ce75e204865f2db388f00
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
3 // found in the LICENSE file.
5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_STYLE_H_
6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_STYLE_H_
8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/geometry/size.h"
11 #include "ui/message_center/message_center_export.h"
13 namespace message_center {
15 // Exported values /////////////////////////////////////////////////////////////
17 // Square image sizes in DIPs.
18 const int kNotificationButtonIconSize = 16;
19 const int kNotificationIconSize = 80;
20 // A border is applied to images that have a non-preferred aspect ratio.
21 const int kNotificationImageBorderSize = 10;
22 const int kNotificationPreferredImageWidth = 360;
23 const int kNotificationPreferredImageHeight = 240;
24 const int kSmallImageSize = 16;
25 const int kSmallImagePadding = 4;
27 // Limits.
28 const size_t kMaxVisibleMessageCenterNotifications = 100;
29 const size_t kMaxVisiblePopupNotifications = 3;
31 // DIP dimension; H size of the whole card.
32 const int kNotificationWidth = 360;
33 const int kMinScrollViewHeight = 100;
35 // Colors.
36 MESSAGE_CENTER_EXPORT extern const SkColor kMessageCenterBorderColor;
37 MESSAGE_CENTER_EXPORT extern const SkColor kMessageCenterShadowColor;
39 // Settings dialog constants.
40 namespace settings {
42 const SkColor kEntrySeparatorColor = SkColorSetARGB(0.1 * 255, 0, 0, 0);
43 const int kEntryHeight = 45;
44 const int kEntrySeparatorHeight = 1;
45 const int kHorizontalMargin = 10;
46 const int kTopMargin = 20;
47 const int kTitleToDescriptionSpace = 20;
48 const int kEntryIconSize = 16;
49 const int kDescriptionToSwitcherSpace = 15;
50 const int kInternalHorizontalSpacing = 10;
51 const int kCheckboxSizeWithPadding = 24;
53 } // namespace settings
55 // Within a notification ///////////////////////////////////////////////////////
57 // DIP dimensions (H = horizontal, V = vertical).
59 const int kControlButtonSize = 29; // Square size of close & expand buttons.
60 const int kIconToTextPadding = 16; // H space between icon & title/message.
61 const int kTextTopPadding = 12; // V space between text elements.
62 const int kIconBottomPadding = 16; // Minimum non-zero V space between icon
63 // and frame.
65 // Text sizes.
66 const int kTitleFontSize = 14; // For title only.
67 const int kEmptyCenterFontSize = 13; // For empty message only.
68 const int kTitleLineHeight = 20; // In DIPs.
69 const int kMessageFontSize = 12; // For everything but title.
70 const int kMessageLineHeight = 18; // In DIPs.
72 // Colors.
73 extern const SkColor kNotificationBackgroundColor; // Background of the card.
74 extern const SkColor kImageBackgroundColor; // Background of the image.
75 extern const SkColor kIconBackgroundColor; // Used behind icons smaller
76 // than the icon view.
77 extern const SkColor kRegularTextColor; // Title, message, ...
78 extern const SkColor kDimTextColor;
79 extern const SkColor kFocusBorderColor; // The focus border.
80 MESSAGE_CENTER_EXPORT extern const SkColor
81 kSmallImageMaskForegroundColor; // Foreground of small icon image.
82 MESSAGE_CENTER_EXPORT extern const SkColor
83 kSmallImageMaskBackgroundColor; // Background of small icon image.
85 // Limits.
87 // Given the size of an image, returns the size of the properly scaled-up image
88 // which fits into |container_size|.
89 MESSAGE_CENTER_EXPORT gfx::Size GetImageSizeForContainerSize(
90 const gfx::Size& container_size,
91 const gfx::Size& image_size);
93 extern const int kNotificationMaximumImageHeight; // For image notifications.
94 extern const size_t kNotificationMaximumItems; // For list notifications.
96 // Timing.
97 extern const int kAutocloseDefaultDelaySeconds;
98 extern const int kAutocloseHighPriorityDelaySeconds;
100 // Buttons.
101 const int kButtonHeight = 38; // In DIPs.
102 const int kButtonHorizontalPadding = 16; // In DIPs.
103 const int kButtonIconTopPadding = 11; // In DIPs.
104 const int kButtonIconToTitlePadding = 16; // In DIPs.
106 #if !defined(OS_LINUX) || defined(USE_AURA)
107 const SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234);
108 const SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243);
109 #endif
111 // Progress bar.
112 const int kProgressBarThickness = 5;
113 const int kProgressBarTopPadding = 16;
114 const int kProgressBarCornerRadius = 3;
115 const SkColor kProgressBarBackgroundColor = SkColorSetRGB(216, 216, 216);
116 const SkColor kProgressBarSliceColor = SkColorSetRGB(120, 120, 120);
118 // Line limits.
119 const int kMaxTitleLines = 2;
120 const int kMessageCollapsedLineLimit = 2;
121 const int kMessageExpandedLineLimit = 5;
122 const int kContextMessageLineLimit = 1;
124 // Around notifications ////////////////////////////////////////////////////////
126 // DIP dimensions (H = horizontal, V = vertical).
127 const int kMarginBetweenItems = 10; // H & V space around & between
128 // notifications.
130 // Colors.
131 extern const SkColor kBackgroundLightColor; // Behind notifications, gradient
132 extern const SkColor kBackgroundDarkColor; // from light to dark.
134 extern const SkColor kShadowColor; // Shadow in the tray.
136 extern const SkColor kMessageCenterBackgroundColor;
137 extern const SkColor kFooterDelimiterColor; // Separator color for the tray.
138 extern const SkColor kFooterTextColor; // Text color for tray labels.
140 } // namespace message_center
142 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_STYLE_H_