Commit 154af54f authored by noms's avatar noms Committed by Commit bot

[Mac] Fix the height of the email address field in the new avatar button.

BUG=410915
TEST=Start Chrome with --enable-new-avatar-menu. Sign in a profile. In
the avatar menu, the descenders in the "@gmail.com" string should not
be cut off.

Review URL: https://codereview.chromium.org/546053003

Cr-Commit-Position: refs/heads/master@{#293716}
parent a8cb7294
...@@ -1574,7 +1574,6 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, ...@@ -1574,7 +1574,6 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
// The available links depend on the type of profile that is active. // The available links depend on the type of profile that is active.
if (item.signed_in) { if (item.signed_in) {
rect.size.height = kBlueButtonHeight / 2;
// Signed in profiles with no authentication errors do not have a clickable // Signed in profiles with no authentication errors do not have a clickable
// email link. // email link.
NSButton* link = nil; NSButton* link = nil;
...@@ -1610,8 +1609,10 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, ...@@ -1610,8 +1609,10 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
[link setEnabled:NO]; [link setEnabled:NO];
} }
} }
// -linkButtonWithTitle sizeToFit's the link, so re-stretch it so that it // -linkButtonWithTitle sizeToFit's the link. We can use the height, but
// can be centered correctly in the view. // need to re-stretch the width so that the link can be centered correctly
// in the view.
rect.size.height = [link frame].size.height;
[link setAlignment:NSCenterTextAlignment]; [link setAlignment:NSCenterTextAlignment];
[link setFrame:rect]; [link setFrame:rect];
[container addSubview:link]; [container addSubview:link];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment