OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/message_center/message_center_style.h" | 5 #include "ui/message_center/message_center_style.h" |
6 | 6 |
7 namespace message_center { | 7 namespace message_center { |
8 | 8 |
9 // Exported values ///////////////////////////////////////////////////////////// | 9 // Exported values ///////////////////////////////////////////////////////////// |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 double proportion = size.height() / static_cast<double>(size.width()); | 52 double proportion = size.height() / static_cast<double>(size.width()); |
53 size.SetSize(width, std::max(0.5 + width * proportion, 1.0)); | 53 size.SetSize(width, std::max(0.5 + width * proportion, 1.0)); |
54 if (size.height() > kNotificationMaximumImageHeight) { | 54 if (size.height() > kNotificationMaximumImageHeight) { |
55 int height = kNotificationMaximumImageHeight; | 55 int height = kNotificationMaximumImageHeight; |
56 size.SetSize(std::max(0.5 + height / proportion, 1.0), height); | 56 size.SetSize(std::max(0.5 + height / proportion, 1.0), height); |
57 } | 57 } |
58 } | 58 } |
59 return size; | 59 return size; |
60 } | 60 } |
61 | 61 |
62 const size_t kNotificationMaximumItems = 8; | 62 const size_t kNotificationMaximumItems = 5; |
63 | 63 |
64 // Timing. | 64 // Timing. |
65 const int kAutocloseDefaultDelaySeconds = 8; | 65 const int kAutocloseDefaultDelaySeconds = 8; |
66 const int kAutocloseHighPriorityDelaySeconds = 25; | 66 const int kAutocloseHighPriorityDelaySeconds = 25; |
67 | 67 |
68 // Around notifications //////////////////////////////////////////////////////// | 68 // Around notifications //////////////////////////////////////////////////////// |
69 | 69 |
70 // Pixel dimensions. | 70 // Pixel dimensions. |
71 const int kMarginBetweenItems = 10; | 71 const int kMarginBetweenItems = 10; |
72 | 72 |
73 // Colors. | 73 // Colors. |
74 const SkColor kBackgroundLightColor = SkColorSetRGB(0xf1, 0xf1, 0xf1); | 74 const SkColor kBackgroundLightColor = SkColorSetRGB(0xf1, 0xf1, 0xf1); |
75 const SkColor kBackgroundDarkColor = SkColorSetRGB(0xe7, 0xe7, 0xe7); | 75 const SkColor kBackgroundDarkColor = SkColorSetRGB(0xe7, 0xe7, 0xe7); |
76 const SkColor kShadowColor = SkColorSetARGB(0.3 * 255, 0, 0, 0); | 76 const SkColor kShadowColor = SkColorSetARGB(0.3 * 255, 0, 0, 0); |
77 const SkColor kMessageCenterBackgroundColor = SkColorSetRGB(0xee, 0xee, 0xee); | 77 const SkColor kMessageCenterBackgroundColor = SkColorSetRGB(0xee, 0xee, 0xee); |
78 const SkColor kFooterDelimiterColor = SkColorSetRGB(0xcc, 0xcc, 0xcc); | 78 const SkColor kFooterDelimiterColor = SkColorSetRGB(0xcc, 0xcc, 0xcc); |
79 const SkColor kFooterTextColor = SkColorSetRGB(0x7b, 0x7b, 0x7b); | 79 const SkColor kFooterTextColor = SkColorSetRGB(0x7b, 0x7b, 0x7b); |
80 | 80 |
81 } // namespace message_center | 81 } // namespace message_center |
OLD | NEW |