Commit a0301392 authored by noms@chromium.org's avatar noms@chromium.org

[Mac] With the new avatar button, tabs do not expand to fill bar in fullscreen

When in fullscreen we should give back the fullscreen icon's width to the tabstrip.

Before: https://drive.google.com/open?id=0B1B1Up4p2NRMdXloQ3phSElBeEk&authuser=1
After: https://drive.google.com/open?id=0B1B1Up4p2NRMM2JNRE56aC1uRDA&authuser=1

BUG=403561

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

Cr-Commit-Position: refs/heads/master@{#291162}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291162 0039d316-1c4b-4281-b951-d872f2087c98
parent 66961b2f
...@@ -357,10 +357,16 @@ willPositionSheet:(NSWindow*)sheet ...@@ -357,10 +357,16 @@ willPositionSheet:(NSWindow*)sheet
static_cast<FramedBrowserWindow*>([self window]); static_cast<FramedBrowserWindow*>([self window]);
rightIndent += -[window fullScreenButtonOriginAdjustment].x; rightIndent += -[window fullScreenButtonOriginAdjustment].x;
// The new avatar is wider than the default indentation, so we need to if ([self shouldUseNewAvatarButton]) {
// account for its width. // The new avatar is wider than the default indentation, so we need to
if ([self shouldUseNewAvatarButton]) // account for its width.
rightIndent += NSWidth([avatarButton frame]) + kAvatarTabStripShrink; rightIndent += NSWidth([avatarButton frame]) + kAvatarTabStripShrink;
// When the fullscreen icon is not displayed, return its width to the
// tabstrip.
if ([self isFullscreen])
rightIndent -= kFullscreenIconWidth;
}
} else if ([self shouldShowAvatar]) { } else if ([self shouldShowAvatar]) {
rightIndent += kAvatarTabStripShrink + rightIndent += kAvatarTabStripShrink +
NSWidth([avatarButton frame]) + kAvatarRightOffset; NSWidth([avatarButton frame]) + kAvatarRightOffset;
......
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