diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-17 21:41:04 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-17 21:41:04 +0000 |
commit | 0cbacf170644b4efce6c98b6637bba942b9110a5 (patch) | |
tree | 783e73c61472478cedc4b672a31c12644b91a950 /chrome/browser/cocoa/about_window_controller.mm | |
parent | a97488fbfc5c97b21e01b90a2220f9a65877e31e (diff) | |
download | chromium_src-0cbacf170644b4efce6c98b6637bba942b9110a5.zip chromium_src-0cbacf170644b4efce6c98b6637bba942b9110a5.tar.gz chromium_src-0cbacf170644b4efce6c98b6637bba942b9110a5.tar.bz2 |
Reverting 26482.
relied on making the field editable which really doesn't work for legal text you show a user
BUG=20493
BUG=20855
BUG=22179
BUG=22180
Review URL: http://codereview.chromium.org/212010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26488 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/about_window_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/about_window_controller.mm | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/chrome/browser/cocoa/about_window_controller.mm b/chrome/browser/cocoa/about_window_controller.mm index 01f21d9..2dff4ed 100644 --- a/chrome/browser/cocoa/about_window_controller.mm +++ b/chrome/browser/cocoa/about_window_controller.mm @@ -10,7 +10,6 @@ #include "base/string_util.h" #include "base/sys_string_conversions.h" #import "chrome/app/keystone_glue.h" -#include "chrome/browser/browser_list.h" #import "chrome/browser/cocoa/about_window_controller.h" #import "chrome/browser/cocoa/background_tile_view.h" #include "chrome/browser/cocoa/restart_browser.h" @@ -163,7 +162,7 @@ NSAttributedString* BuildLegalTextBlock() { NSString* about_terms = base::SysWideToNSString(w_about_terms); NSString* terms_link_text = l10n_util::GetNSString(IDS_TERMS_OF_SERVICE); - AttributedStringAppendString(legal_block, @"\n\n"); + AttributedStringAppendString(legal_block, @"\n"); sub_str = [about_terms substringToIndex:url_offsets[0]]; AttributedStringAppendString(legal_block, sub_str); AttributedStringAppendHyperlink(legal_block, terms_link_text, kTOS); @@ -210,16 +209,9 @@ NSAttributedString* BuildLegalTextBlock() { DCHECK(logoImage); [logoView_ setImage:logoImage]; - [legalText_ insertText:BuildLegalTextBlock()]; + // Put the legal text into + [legalBlock_ setAttributedStringValue:BuildLegalTextBlock()]; - // Resize our text view now so that the |updateShift| below is set correctly. - NSRect oldLegalRect = [legalBlock_ frame]; - [legalText_ sizeToFit]; - NSRect newRect = oldLegalRect; - newRect.size.height = [legalText_ frame].size.height; - [legalBlock_ setFrame:newRect]; - CGFloat legalShift = newRect.size.height - oldLegalRect.size.height; - KeystoneGlue* keystone = [self defaultKeystoneGlue]; CGFloat updateShift = 0.0; if (keystone) { @@ -234,8 +226,12 @@ NSAttributedString* BuildLegalTextBlock() { // (and it's spacing). updateShift = NSMinY([legalBlock_ frame]) - NSMinY([updateBlock_ frame]); } - + // Adjust the sizes/locations. + + CGFloat legalShift = + [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:legalBlock_]; + NSRect rect = [legalBlock_ frame]; rect.origin.y -= updateShift; [legalBlock_ setFrame:rect]; @@ -384,15 +380,6 @@ NSAttributedString* BuildLegalTextBlock() { } } -- (BOOL)textView:(NSTextView *)aTextView - clickedOnLink:(id)link - atIndex:(NSUInteger)charIndex { - BrowserList::GetLastActive()-> - OpenURL(GURL([link UTF8String]), GURL(), NEW_WINDOW, - PageTransition::LINK); - return YES; -} - - (NSButton*)updateButton { return updateNowButton_; } |