Chromium Code Reviews| Index: chrome/browser/ui/cocoa/one_click_signin_view_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm |
| index 26c7c4eb5e68e5ff7c6c18b0e42f4dad80f31022..96d5bfe8583caa3403254a085ba78dd46a6ec0c9 100644 |
| --- a/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm |
| +++ b/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm |
| @@ -232,6 +232,7 @@ void ShiftOriginY(NSView* view, CGFloat amount) { |
| // Set the text. |
| NSString* learnMoreText = l10n_util::GetNSStringWithFixup(IDS_LEARN_MORE); |
| NSString* messageText; |
| + NSUInteger learnMoreOffset = 0; |
| ui::ResourceBundle::FontStyle fontStyle = isSyncDialog_ ? |
| chrome_style::kTextFontStyle : ui::ResourceBundle::SmallFont; |
| @@ -243,20 +244,21 @@ void ShiftOriginY(NSView* view, CGFloat amount) { |
| if (isSyncDialog_) { |
| messageText = l10n_util::GetNSStringFWithFixup( |
| IDS_ONE_CLICK_SIGNIN_DIALOG_MESSAGE_NEW, email_); |
| - messageText = [messageText stringByAppendingString:@" "]; |
| + learnMoreOffset = [messageText length]; |
| + messageText = [messageText stringByAppendingFormat:@" %@", learnMoreText]; |
| } else { |
| - messageText = @""; |
| + messageText = learnMoreText; |
| } |
| NSColor* linkColor = |
| gfx::SkColorToCalibratedNSColor(chrome_style::GetLinkColor()); |
| - [informativeTextView_ setMessageAndLink:messageText |
| - withLink:learnMoreText |
| - atOffset:[messageText length] |
| - font:font |
| - messageColor:[NSColor blackColor] |
| - linkColor:linkColor]; |
| - |
| + [informativeTextView_ setMessage:messageText |
| + withFont:font |
| + messageColor:[NSColor blackColor]]; |
| + [informativeTextView_ addLinkRange:NSMakeRange(learnMoreOffset, |
| + [learnMoreText length]) |
|
groby-ooo-7-16
2015/01/30 23:08:39
nit: parameters should be aligned
shrike
2015/02/02 17:39:13
The style guide had me confused on continuation li
|
| + withName:@"" |
| + linkColor:linkColor]; |
| // Make the "Advanced" link font as large as the "Learn More" link. |
| [[advancedLink_ cell] setFont:font]; |