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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.mm

Issue 1364113003: Only (and always) put URLs in NSLinkAttributeName. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobar1
Patch Set: stray deletion Created 5 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h " 5 #import "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h "
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 [divider_ setBoxType:NSBoxCustom]; 100 [divider_ setBoxType:NSBoxCustom];
101 [divider_ setBorderType:NSLineBorder]; 101 [divider_ setBorderType:NSLineBorder];
102 [divider_ setBorderColor:DividerColor()]; 102 [divider_ setBorderColor:DividerColor()];
103 [self addSubview:divider_]; 103 [self addSubview:divider_];
104 104
105 helpTextView_.reset([[HyperlinkTextView alloc] initWithFrame:NSZeroRect]); 105 helpTextView_.reset([[HyperlinkTextView alloc] initWithFrame:NSZeroRect]);
106 [helpTextView_ setMessage:base::SysUTF16ToNSString(controller_->HelpText()) 106 [helpTextView_ setMessage:base::SysUTF16ToNSString(controller_->HelpText())
107 withFont:[self textFont] 107 withFont:[self textFont]
108 messageColor:HelpTextColor()]; 108 messageColor:HelpTextColor()];
109 [helpTextView_ addLinkRange:controller_->HelpTextLinkRange().ToNSRange() 109 [helpTextView_ addLinkRange:controller_->HelpTextLinkRange().ToNSRange()
110 withName:@"" 110 withURL:@"about:blank" // using a link here is bad ui
111 linkColor:HelpLinkColor()]; 111 linkColor:HelpLinkColor()];
112 [helpTextView_ setDelegate:self]; 112 [helpTextView_ setDelegate:self];
113 [helpTextView_ setDrawsBackground:YES]; 113 [helpTextView_ setDrawsBackground:YES];
114 [helpTextView_ setBackgroundColor:HelpTextBackgroundColor()]; 114 [helpTextView_ setBackgroundColor:HelpTextBackgroundColor()];
115 [helpTextView_ 115 [helpTextView_
116 setTextContainerInset:NSMakeSize(controller_->kHorizontalPadding, 116 setTextContainerInset:NSMakeSize(controller_->kHorizontalPadding,
117 controller_->kHelpVerticalPadding)]; 117 controller_->kHelpVerticalPadding)];
118 // Remove the underlining. 118 // Remove the underlining.
119 NSTextStorage* text = [helpTextView_ textStorage]; 119 NSTextStorage* text = [helpTextView_ textStorage];
120 [text addAttribute:NSUnderlineStyleAttributeName 120 [text addAttribute:NSUnderlineStyleAttributeName
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 - (NSFont*)boldFont { 351 - (NSFont*)boldFont {
352 return [NSFont boldSystemFontOfSize:[NSFont smallSystemFontSize]]; 352 return [NSFont boldSystemFontOfSize:[NSFont smallSystemFontSize]];
353 } 353 }
354 354
355 - (NSFont*)textFont { 355 - (NSFont*)textFont {
356 return [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; 356 return [NSFont systemFontOfSize:[NSFont smallSystemFontSize]];
357 } 357 }
358 358
359 @end 359 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698