Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1312)

Unified Diff: ui/message_center/message_center_style.cc

Issue 102473005: Refresh for the Chrome notifications image template. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac unit test Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/message_center_style.h ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/message_center_style.cc
diff --git a/ui/message_center/message_center_style.cc b/ui/message_center/message_center_style.cc
index 5b400164ccdd305c9bec7f2e281bccbf1e3149a6..ab5a08cee82a708c3ad555ef546a1759fcc06546 100644
--- a/ui/message_center/message_center_style.cc
+++ b/ui/message_center/message_center_style.cc
@@ -19,6 +19,7 @@ const SkColor kMessageCenterShadowColor = SkColorSetARGB(0.5 * 255, 0, 0, 0);
// Colors.
const SkColor kNotificationBackgroundColor = SkColorSetRGB(255, 255, 255);
const SkColor kIconBackgroundColor = SkColorSetRGB(0xf5, 0xf5, 0xf5);
+const SkColor kImageBackgroundColor = SkColorSetRGB(0x22, 0x22, 0x22);
const SkColor kRegularTextColor = SkColorSetRGB(0x33, 0x33, 0x33);
const SkColor kDimTextColor = SkColorSetRGB(0x7f, 0x7f, 0x7f);
const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250);
@@ -26,15 +27,12 @@ const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250);
// Limits.
gfx::Size GetImageSizeForWidth(int width, const gfx::Size& image_size) {
- const int kNotificationMaximumImageHeight =
- kNotificationWidth * kNotificationPreferredImageRatio;
-
gfx::Size size = image_size;
if (width > 0 && !size.IsEmpty()) {
double proportion = size.height() / static_cast<double>(size.width());
size.SetSize(width, std::max(0.5 + width * proportion, 1.0));
- if (size.height() > kNotificationMaximumImageHeight) {
- int height = kNotificationMaximumImageHeight;
+ if (size.height() > kNotificationPreferredImageHeight) {
+ int height = kNotificationPreferredImageHeight;
size.SetSize(std::max(0.5 + height / proportion, 1.0), height);
}
}
« no previous file with comments | « ui/message_center/message_center_style.h ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698