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/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;
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;
36 MESSAGE_CENTER_EXPORT
extern const SkColor kMessageCenterBorderColor
;
37 MESSAGE_CENTER_EXPORT
extern const SkColor kMessageCenterShadowColor
;
39 // Settings dialog constants.
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
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.
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.
81 kSmallImageMaskForegroundColor
; // Foreground of small icon image.
83 kSmallImageMaskBackgroundColor
; // Background of small icon image.
87 // Given the size of an image, returns the size of the properly scaled-up image
88 // which fits into |container_size|.
89 gfx::Size
GetImageSizeForContainerSize(const gfx::Size
& container_size
,
90 const gfx::Size
& image_size
);
92 extern const int kNotificationMaximumImageHeight
; // For image notifications.
93 extern const size_t kNotificationMaximumItems
; // For list notifications.
96 extern const int kAutocloseDefaultDelaySeconds
;
97 extern const int kAutocloseHighPriorityDelaySeconds
;
100 const int kButtonHeight
= 38; // In DIPs.
101 const int kButtonHorizontalPadding
= 16; // In DIPs.
102 const int kButtonIconTopPadding
= 11; // In DIPs.
103 const int kButtonIconToTitlePadding
= 16; // In DIPs.
105 #if !defined(OS_LINUX) || defined(USE_AURA)
106 const SkColor kButtonSeparatorColor
= SkColorSetRGB(234, 234, 234);
107 const SkColor kHoveredButtonBackgroundColor
= SkColorSetRGB(243, 243, 243);
111 const int kProgressBarThickness
= 5;
112 const int kProgressBarTopPadding
= 16;
113 const int kProgressBarCornerRadius
= 3;
114 const SkColor kProgressBarBackgroundColor
= SkColorSetRGB(216, 216, 216);
115 const SkColor kProgressBarSliceColor
= SkColorSetRGB(120, 120, 120);
118 const int kMaxTitleLines
= 2;
119 const int kMessageCollapsedLineLimit
= 2;
120 const int kMessageExpandedLineLimit
= 5;
121 const int kContextMessageLineLimit
= 1;
123 // Around notifications ////////////////////////////////////////////////////////
125 // DIP dimensions (H = horizontal, V = vertical).
126 const int kMarginBetweenItems
= 10; // H & V space around & between
130 extern const SkColor kBackgroundLightColor
; // Behind notifications, gradient
131 extern const SkColor kBackgroundDarkColor
; // from light to dark.
133 extern const SkColor kShadowColor
; // Shadow in the tray.
135 extern const SkColor kMessageCenterBackgroundColor
;
136 extern const SkColor kFooterDelimiterColor
; // Separator color for the tray.
137 extern const SkColor kFooterTextColor
; // Text color for tray labels.
139 } // namespace message_center
141 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_STYLE_H_