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

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

Issue 117533002: [Mac] Redesign of the avatar menu button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tabstrip width Created 6 years, 11 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
Index: chrome/browser/ui/cocoa/framed_browser_window.mm
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.mm b/chrome/browser/ui/cocoa/framed_browser_window.mm
index 6c143c507d7a275abefa907277272372f5b49ab6..4167286677f877e5d72cf07e0eafc5ca0638a6ad 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window.mm
@@ -314,13 +314,13 @@ const CGFloat kWindowGradientHeight = 24.0;
// Vertically center the button.
NSPoint origin = NSMakePoint(0, -6);
- // If there is a profile avatar present, shift the button over by its
- // width and some padding.
+ // If there is a profile avatar icon present, shift the button over by its
+ // width and some padding. The new avatar button is displayed to the right
+ // of the fullscreen icon, so it doesn't need to be shifted.
BrowserWindowController* bwc =
static_cast<BrowserWindowController*>([self windowController]);
- if ([bwc shouldShowAvatar]) {
- AvatarButtonController* avatarButtonVC = [bwc avatarButtonController];
- NSView* avatarButton = [avatarButtonVC view];
+ if ([bwc shouldShowAvatar] && ![bwc shouldUseNewAvatarButton]) {
+ NSView* avatarButton = [[bwc avatarButtonController] view];
origin.x = -(NSWidth([avatarButton frame]) + 3);
} else {
origin.x -= 6;

Powered by Google App Engine
This is Rietveld 408576698