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