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

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

Issue 20182002: Make inttypes.h and similar macro usage C++11-friendly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: line Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | url/url_canon_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/status_item_view.h" 5 #import "ui/message_center/cocoa/status_item_view.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 - (NSAttributedString*)unreadCountString { 172 - (NSAttributedString*)unreadCountString {
173 if (unreadCount_ == 0) 173 if (unreadCount_ == 0)
174 return nil; 174 return nil;
175 175
176 NSString* count = nil; 176 NSString* count = nil;
177 if (unreadCount_ > 9) 177 if (unreadCount_ > 9)
178 count = @"9+"; 178 count = @"9+";
179 else 179 else
180 count = [NSString stringWithFormat:@"%"PRIuS, unreadCount_]; 180 count = [NSString stringWithFormat:@"%" PRIuS, unreadCount_];
181 181
182 NSColor* fontColor = [self shouldHighlight] ? [NSColor whiteColor] 182 NSColor* fontColor = [self shouldHighlight] ? [NSColor whiteColor]
183 : [NSColor blackColor]; 183 : [NSColor blackColor];
184 NSDictionary* attributes = @{ 184 NSDictionary* attributes = @{
185 NSFontAttributeName: [NSFont fontWithName:@"Helvetica-Bold" size:12], 185 NSFontAttributeName: [NSFont fontWithName:@"Helvetica-Bold" size:12],
186 NSForegroundColorAttributeName: fontColor, 186 NSForegroundColorAttributeName: fontColor,
187 }; 187 };
188 return [[[NSAttributedString alloc] initWithString:count 188 return [[[NSAttributedString alloc] initWithString:count
189 attributes:attributes] autorelease]; 189 attributes:attributes] autorelease];
190 } 190 }
191 191
192 @end 192 @end
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | url/url_canon_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698