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

Side by Side Diff: ui/message_center/cocoa/notification_controller.mm

Issue 2143653007: Remove icon bg color for message center notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #import "ui/message_center/cocoa/notification_controller.h" 5 #import "ui/message_center/cocoa/notification_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 729
730 - (NSView*)createIconView { 730 - (NSView*)createIconView {
731 // Create another box that shows a background color when the icon is not 731 // Create another box that shows a background color when the icon is not
732 // big enough to fill the space. 732 // big enough to fill the space.
733 NSRect imageFrame = NSMakeRect(0, 0, 733 NSRect imageFrame = NSMakeRect(0, 0,
734 message_center::kNotificationIconSize, 734 message_center::kNotificationIconSize,
735 message_center::kNotificationIconSize); 735 message_center::kNotificationIconSize);
736 base::scoped_nsobject<NSBox> imageBox( 736 base::scoped_nsobject<NSBox> imageBox(
737 [[AccessibilityIgnoredBox alloc] initWithFrame:imageFrame]); 737 [[AccessibilityIgnoredBox alloc] initWithFrame:imageFrame]);
738 [self configureCustomBox:imageBox]; 738 [self configureCustomBox:imageBox];
739 [imageBox setFillColor:skia::SkColorToCalibratedNSColor(
740 message_center::kIconBackgroundColor)];
741 [imageBox setAutoresizingMask:NSViewMinYMargin]; 739 [imageBox setAutoresizingMask:NSViewMinYMargin];
742 740
743 // Inside the image box put the actual icon view. 741 // Inside the image box put the actual icon view.
744 icon_.reset([[NSImageView alloc] initWithFrame:imageFrame]); 742 icon_.reset([[NSImageView alloc] initWithFrame:imageFrame]);
745 [imageBox setContentView:icon_]; 743 [imageBox setContentView:icon_];
746 744
747 return imageBox.autorelease(); 745 return imageBox.autorelease();
748 } 746 }
749 747
750 - (NSBox*)createImageBox:(const gfx::Image&)notificationImage { 748 - (NSBox*)createImageBox:(const gfx::Image&)notificationImage {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 forFont:(NSFont*)nsfont 980 forFont:(NSFont*)nsfont
983 maxNumberOfLines:(size_t)lines { 981 maxNumberOfLines:(size_t)lines {
984 size_t unused; 982 size_t unused;
985 return [self wrapText:text 983 return [self wrapText:text
986 forFont:nsfont 984 forFont:nsfont
987 maxNumberOfLines:lines 985 maxNumberOfLines:lines
988 actualLines:&unused]; 986 actualLines:&unused];
989 } 987 }
990 988
991 @end 989 @end
OLDNEW
« no previous file with comments | « chrome/browser/download/notification/download_item_notification.cc ('k') | ui/message_center/message_center_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698