Roll src/third_party/skia d32087a:1052f51
[chromium-blink-merge.git] / ui / message_center / message_center_style.h
blob51ab6652f943eb2cbeaaada33344104a931ff44c
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.
64 // H space between the context message and the end of the card.
65 const int kTextRightPadding = 23;
66 const int kTextLeftPadding = kNotificationIconSize + kIconToTextPadding;
67 const int kContextMessageViewWidth =
68 kNotificationWidth - kTextLeftPadding - kTextRightPadding;
70 // Text sizes.
71 const int kTitleFontSize = 14; // For title only.
72 const int kEmptyCenterFontSize = 13; // For empty message only.
73 const int kTitleLineHeight = 20; // In DIPs.
74 const int kMessageFontSize = 12; // For everything but title.
75 const int kMessageLineHeight = 18; // In DIPs.
77 // Colors.
78 extern const SkColor kNotificationBackgroundColor; // Background of the card.
79 extern const SkColor kImageBackgroundColor; // Background of the image.
80 extern const SkColor kIconBackgroundColor; // Used behind icons smaller
81 // than the icon view.
82 extern const SkColor kRegularTextColor; // Title, message, ...
83 extern const SkColor kDimTextColor;
84 extern const SkColor kFocusBorderColor; // The focus border.
85 MESSAGE_CENTER_EXPORT extern const SkColor
86 kSmallImageMaskForegroundColor; // Foreground of small icon image.
87 MESSAGE_CENTER_EXPORT extern const SkColor
88 kSmallImageMaskBackgroundColor; // Background of small icon image.
90 // Limits.
92 // Given the size of an image, returns the size of the properly scaled-up image
93 // which fits into |container_size|.
94 MESSAGE_CENTER_EXPORT gfx::Size GetImageSizeForContainerSize(
95 const gfx::Size& container_size,
96 const gfx::Size& image_size);
98 extern const int kNotificationMaximumImageHeight; // For image notifications.
99 extern const size_t kNotificationMaximumItems; // For list notifications.
101 // Timing.
102 extern const int kAutocloseDefaultDelaySeconds;
103 extern const int kAutocloseHighPriorityDelaySeconds;
105 // Buttons.
106 const int kButtonHeight = 38; // In DIPs.
107 const int kButtonHorizontalPadding = 16; // In DIPs.
108 const int kButtonIconTopPadding = 11; // In DIPs.
109 const int kButtonIconToTitlePadding = 16; // In DIPs.
111 #if !defined(OS_LINUX) || defined(USE_AURA)
112 const SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234);
113 const SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243);
114 #endif
116 // Progress bar.
117 const int kProgressBarThickness = 5;
118 const int kProgressBarTopPadding = 16;
119 const int kProgressBarCornerRadius = 3;
120 const SkColor kProgressBarBackgroundColor = SkColorSetRGB(216, 216, 216);
121 const SkColor kProgressBarSliceColor = SkColorSetRGB(120, 120, 120);
123 // Line limits.
124 const int kMaxTitleLines = 2;
125 const int kMessageCollapsedLineLimit = 2;
126 const int kMessageExpandedLineLimit = 5;
127 const int kContextMessageLineLimit = 1;
129 // Around notifications ////////////////////////////////////////////////////////
131 // DIP dimensions (H = horizontal, V = vertical).
132 const int kMarginBetweenItems = 10; // H & V space around & between
133 // notifications.
135 // Colors.
136 extern const SkColor kBackgroundLightColor; // Behind notifications, gradient
137 extern const SkColor kBackgroundDarkColor; // from light to dark.
139 extern const SkColor kShadowColor; // Shadow in the tray.
141 extern const SkColor kMessageCenterBackgroundColor;
142 extern const SkColor kFooterDelimiterColor; // Separator color for the tray.
143 extern const SkColor kFooterTextColor; // Text color for tray labels.
145 } // namespace message_center
147 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_STYLE_H_