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 #include "ui/message_center/message_center_style.h"
9 namespace message_center
{
11 // Exported values /////////////////////////////////////////////////////////////
14 const SkColor kMessageCenterBorderColor
= SkColorSetRGB(0xC7, 0xCA, 0xCE);
15 const SkColor kMessageCenterShadowColor
= SkColorSetARGB(0.5 * 255, 0, 0, 0);
17 // Within a notification ///////////////////////////////////////////////////////
20 const SkColor kNotificationBackgroundColor
= SkColorSetRGB(255, 255, 255);
21 const SkColor kIconBackgroundColor
= SkColorSetRGB(0xf5, 0xf5, 0xf5);
22 const SkColor kImageBackgroundColor
= SkColorSetRGB(0x22, 0x22, 0x22);
23 const SkColor kRegularTextColor
= SkColorSetRGB(0x33, 0x33, 0x33);
24 const SkColor kDimTextColor
= SkColorSetRGB(0x7f, 0x7f, 0x7f);
25 const SkColor kFocusBorderColor
= SkColorSetRGB(64, 128, 250);
26 const SkColor kSmallImageMaskForegroundColor
= SK_ColorWHITE
;
27 const SkColor kSmallImageMaskBackgroundColor
= SkColorSetRGB(0xa3, 0xa3, 0xa3);
31 gfx::Size
GetImageSizeForContainerSize(const gfx::Size
& container_size
,
32 const gfx::Size
& image_size
) {
33 if (container_size
.IsEmpty() || image_size
.IsEmpty())
36 gfx::Size scaled_size
= image_size
;
38 scaled_size
.height() / static_cast<double>(scaled_size
.width());
39 // We never want to return an empty image given a non-empty container and
40 // image, so round the height to 1.
41 scaled_size
.SetSize(container_size
.width(),
42 std::max(0.5 + container_size
.width() * proportion
, 1.0));
43 if (scaled_size
.height() > container_size
.height()) {
45 std::max(0.5 + container_size
.height() / proportion
, 1.0),
46 container_size
.height());
52 const size_t kNotificationMaximumItems
= 5;
55 const int kAutocloseDefaultDelaySeconds
= 8;
56 const int kAutocloseHighPriorityDelaySeconds
= 25;
59 const SkColor kBackgroundLightColor
= SkColorSetRGB(0xf1, 0xf1, 0xf1);
60 const SkColor kBackgroundDarkColor
= SkColorSetRGB(0xe7, 0xe7, 0xe7);
61 const SkColor kShadowColor
= SkColorSetARGB(0.3 * 255, 0, 0, 0);
62 const SkColor kMessageCenterBackgroundColor
= SkColorSetRGB(0xee, 0xee, 0xee);
63 const SkColor kFooterDelimiterColor
= SkColorSetRGB(0xcc, 0xcc, 0xcc);
64 const SkColor kFooterTextColor
= SkColorSetRGB(0x7b, 0x7b, 0x7b);
66 } // namespace message_center