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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 10578022: Fix location of avatar/incognito. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more correct Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index f517536883babc34b8878eb15cc53ba6722a938c..5352dde4818c108bcea5788c128cbff34405412e 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.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698