Commit 4e12c356 authored by akuegel@chromium.org's avatar akuegel@chromium.org

Fix bug with the avatar menu alignment.

BUG=254364
TEST=In avatar menu of managed user, click on switch user.

Review URL: https://chromiumcodereview.appspot.com/18199004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209322 0039d316-1c4b-4281-b951-d872f2087c98
parent a062c07e
...@@ -183,11 +183,13 @@ const CGFloat kManagedUserSpacing = 26.0; ...@@ -183,11 +183,13 @@ const CGFloat kManagedUserSpacing = 26.0;
NSRect frame = [[self window] frame]; NSRect frame = [[self window] frame];
// Adjust the origin after we have switched from the managed user menu to the // Adjust the origin after we have switched from the managed user menu to the
// regular menu. // regular menu.
if (expanded_) CGFloat newWidth = std::min(kBubbleMinWidth + width, kBubbleMaxWidth);
if (expanded_) {
frame.origin.x += frame.size.width - newWidth;
frame.origin.y += frame.size.height - yOffset; frame.origin.y += frame.size.height - yOffset;
}
frame.size.height = yOffset; frame.size.height = yOffset;
frame.size.width = kBubbleMinWidth + width; frame.size.width = newWidth;
frame.size.width = std::min(NSWidth(frame), kBubbleMaxWidth);
[[self window] setFrame:frame display:YES]; [[self window] setFrame:frame display:YES];
} }
......
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