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