From 1c88fde629cf940c178654964d4785140f20b7f3 Mon Sep 17 00:00:00 2001 From: "avi@chromium.org" Date: Thu, 21 Jun 2012 21:22:12 +0000 Subject: Merge 143070 - Fix location of avatar/incognito. BUG=133299 TEST=as in bug Review URL: https://chromiumcodereview.appspot.com/10578022 TBR=avi@chromium.org Review URL: https://chromiumcodereview.appspot.com/10641011 git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@143456 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/cocoa/browser_window_controller_private.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm index f517536..5352dde 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm @@ -22,6 +22,7 @@ #import "chrome/browser/ui/cocoa/framed_browser_window.h" #import "chrome/browser/ui/cocoa/fullscreen_window.h" #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" +#import "chrome/browser/ui/cocoa/nsview_additions.h" #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" #import "chrome/browser/ui/cocoa/status_bubble_mac.h" #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h" @@ -371,10 +372,11 @@ willPositionSheet:(NSWindow*)sheet // Actually place the badge *above* |maxY|, by +2 to miss the divider. On // Lion or later, shift the badge left to move it away from the fullscreen // button. - CGFloat badgeOffset = kAvatarRightOffset + possibleExtraShiftForLion; + CGFloat badgeXOffset = -(kAvatarRightOffset + possibleExtraShiftForLion); + CGFloat badgeYOffset = 2 * [[avatarButton superview] cr_lineWidth]; NSPoint origin = - NSMakePoint(width - NSWidth([avatarButton frame]) - badgeOffset, - maxY + 2); + NSMakePoint(width - NSWidth([avatarButton frame]) + badgeXOffset, + maxY + badgeYOffset); [avatarButton setFrameOrigin:origin]; [avatarButton setHidden:NO]; // Make sure it's shown. } -- cgit v1.1