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

Side by Side Diff: ui/app_list/cocoa/app_list_view_controller.mm

Issue 1842663003: Mac: Replace uses of deprecated NSNoUnderlineStyle and NSSingleUnderlineStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160329-Mac-DeploymentTarget
Patch Set: cl format Created 4 years, 8 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
« no previous file with comments | « no previous file | ui/base/cocoa/controls/hyperlink_button_cell.mm » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/app_list/cocoa/app_list_view_controller.h" 5 #import "ui/app_list/cocoa/app_list_view_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 attributes:defaultAttributes]); 281 attributes:defaultAttributes]);
282 base::scoped_nsobject<NSAttributedString> messagePreString( 282 base::scoped_nsobject<NSAttributedString> messagePreString(
283 [[NSAttributedString alloc] 283 [[NSAttributedString alloc]
284 initWithString:base::SysUTF16ToNSString(messagePre) 284 initWithString:base::SysUTF16ToNSString(messagePre)
285 attributes:defaultAttributes]); 285 attributes:defaultAttributes]);
286 base::scoped_nsobject<NSAttributedString> messagePostString( 286 base::scoped_nsobject<NSAttributedString> messagePostString(
287 [[NSAttributedString alloc] 287 [[NSAttributedString alloc]
288 initWithString:base::SysUTF16ToNSString(messagePost) 288 initWithString:base::SysUTF16ToNSString(messagePost)
289 attributes:defaultAttributes]); 289 attributes:defaultAttributes]);
290 290
291 // NSNoUnderlineStyle is broken. 291 // NSUnderlineStyleNone is broken.
292 base::scoped_nsobject<NSAttributedString> learnMoreString( 292 base::scoped_nsobject<NSAttributedString> learnMoreString(
293 [[NSAttributedString alloc] 293 [[NSAttributedString alloc]
294 initWithString:base::SysUTF16ToNSString(learnMore) 294 initWithString:base::SysUTF16ToNSString(learnMore)
295 attributes:@{ 295 attributes:@{
296 NSParagraphStyleAttributeName : paragraphStyle, 296 NSParagraphStyleAttributeName : paragraphStyle,
297 NSFontAttributeName : messageFont, 297 NSFontAttributeName : messageFont,
298 NSLinkAttributeName : linkURL, 298 NSLinkAttributeName : linkURL,
299 NSBaselineOffsetAttributeName : baselineOffset, 299 NSBaselineOffsetAttributeName : baselineOffset,
300 NSUnderlineStyleAttributeName : 300 NSUnderlineStyleAttributeName :
301 [NSNumber numberWithInt:NSNoUnderlineStyle] 301 [NSNumber numberWithInt:NSUnderlineStyleNone]
302 }]); 302 }]);
303 base::scoped_nsobject<NSAttributedString> shortcutStringText( 303 base::scoped_nsobject<NSAttributedString> shortcutStringText(
304 [[NSAttributedString alloc] 304 [[NSAttributedString alloc]
305 initWithString:base::SysUTF16ToNSString(shortcutName) 305 initWithString:base::SysUTF16ToNSString(shortcutName)
306 attributes:defaultAttributes]); 306 attributes:defaultAttributes]);
307 base::scoped_nsobject<NSMutableAttributedString> shortcutString( 307 base::scoped_nsobject<NSMutableAttributedString> shortcutString(
308 [[NSMutableAttributedString alloc] init]); 308 [[NSMutableAttributedString alloc] init]);
309 if (icon) { 309 if (icon) {
310 NSImage* image = gfx::NSImageFromImageSkia(*icon); 310 NSImage* image = gfx::NSImageFromImageSkia(*icon);
311 // The image has a bunch of representations. Ensure the smallest is used. 311 // The image has a bunch of representations. Ensure the smallest is used.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 return YES; 599 return YES;
600 } 600 }
601 601
602 - (NSArray*)textView:(NSTextView*)aTextView 602 - (NSArray*)textView:(NSTextView*)aTextView
603 willChangeSelectionFromCharacterRanges:(NSArray*)oldSelectedCharRanges 603 willChangeSelectionFromCharacterRanges:(NSArray*)oldSelectedCharRanges
604 toCharacterRanges:(NSArray*)newSelectedCharRanges { 604 toCharacterRanges:(NSArray*)newSelectedCharRanges {
605 return oldSelectedCharRanges; 605 return oldSelectedCharRanges;
606 } 606 }
607 607
608 @end 608 @end
OLDNEW
« no previous file with comments | « no previous file | ui/base/cocoa/controls/hyperlink_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698