summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 02:11:49 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 02:11:49 +0000
commitad27b85ef15c7446744911b776a733842f8e9206 (patch)
treec4120b9492d6386043bad8e51b58cac03fd5b444
parent69a9dcf57693dc2f10163abfe9208155f3df6307 (diff)
downloadchromium_src-ad27b85ef15c7446744911b776a733842f8e9206.zip
chromium_src-ad27b85ef15c7446744911b776a733842f8e9206.tar.gz
chromium_src-ad27b85ef15c7446744911b776a733842f8e9206.tar.bz2
[Mac] Final tweaks to the Page Info bubble, per Cole.
* Lower the opacity of the separators. * Left-align the help center link. BUG=58480 TEST=Visual Review URL: http://codereview.chromium.org/3616016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62129 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/page_info_bubble_controller.mm14
1 files changed, 5 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/page_info_bubble_controller.mm b/chrome/browser/cocoa/page_info_bubble_controller.mm
index 04a66a2..b8c4af3 100644
--- a/chrome/browser/cocoa/page_info_bubble_controller.mm
+++ b/chrome/browser/cocoa/page_info_bubble_controller.mm
@@ -363,8 +363,8 @@ void ShowPageInfoBubble(gfx::NativeWindow parent,
// delta for the next offset.
- (CGFloat)addHelpButtonToSubviews:(NSMutableArray*)subviews
atOffset:(CGFloat)offset {
- scoped_nsobject<NSButton> button(
- [[NSButton alloc] initWithFrame:NSMakeRect(0, offset, 100, 10)]);
+ NSRect frame = NSMakeRect(kFramePadding, offset, 100, 10);
+ scoped_nsobject<NSButton> button([[NSButton alloc] initWithFrame:frame]);
NSString* string =
l10n_util::GetNSStringWithFixup(IDS_PAGE_INFO_HELP_CENTER_LINK);
scoped_nsobject<HyperlinkButtonCell> cell(
@@ -377,14 +377,9 @@ void ShowPageInfoBubble(gfx::NativeWindow parent,
[button setAction:@selector(showHelpPage:)];
[subviews addObject:button.get()];
- // Call size-to-fit to fixup for the localized string, then center the button
- // in the window.
+ // Call size-to-fit to fixup for the localized string.
[GTMUILocalizerAndLayoutTweaker sizeToFitView:button.get()];
- NSRect frame = [button frame];
- frame.origin.x = (kWindowWidth / 2) - (NSWidth(frame) / 2);
- [button setFrame:frame];
-
- return NSHeight(frame);
+ return NSHeight([button frame]);
}
// Adds a 1px separator between sections. Returns the y position delta for the
@@ -395,6 +390,7 @@ void ShowPageInfoBubble(gfx::NativeWindow parent,
[[NSBox alloc] initWithFrame:NSMakeRect(0, offset, kWindowWidth, 1)]);
[spacer setBoxType:NSBoxSeparator];
[spacer setBorderType:NSLineBorder];
+ [spacer setAlphaValue:0.2];
[subviews addObject:spacer.get()];
return kVerticalSpacing;
}