diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 15:58:37 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 15:58:37 +0000 |
commit | ad54c1966904ed5b3d7e71c8f6caf4606c7e6a93 (patch) | |
tree | 9d444313041981d7fb10270c452bcc4f9f45c775 /chrome/browser/cocoa/tab_strip_controller.mm | |
parent | 05dfe6a91f4670bfc442b3ab918e5092b3eff6cd (diff) | |
download | chromium_src-ad54c1966904ed5b3d7e71c8f6caf4606c7e6a93.zip chromium_src-ad54c1966904ed5b3d7e71c8f6caf4606c7e6a93.tar.gz chromium_src-ad54c1966904ed5b3d7e71c8f6caf4606c7e6a93.tar.bz2 |
Mac: incognito badge fixes.
1. Make the incognito badge appear in fullscreen mode.
2. Make the new tab button not run into the incognito badge.
BUG=37574, 37745
TEST=Make an incognito window and go to fullscreen mode; incognito badge should be visible in upper right. Make an incognito window with lots of tabs; new tab button (and tabs) shouldn't run into the badge; resize the window and make sure the badge stays in the right place.
Review URL: http://codereview.chromium.org/691003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.mm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm index 6fe0222..ef0bcfa 100644 --- a/chrome/browser/cocoa/tab_strip_controller.mm +++ b/chrome/browser/cocoa/tab_strip_controller.mm @@ -60,6 +60,10 @@ const CGFloat kTabOverlap = 20.0; // The amount by which the new tab button is offset (from the tabs). const CGFloat kNewTabButtonOffset = 8.0; +// The amount by which to shrink the tab strip (on the right) when the +// incognito badge is present. +const CGFloat kIncognitoBadgeTabStripShrink = 18; + // Time (in seconds) in which tabs animate to their final position. const NSTimeInterval kAnimationDuration = 0.2; @@ -668,7 +672,10 @@ private: availableWidth = availableResizeWidth_; } else { availableWidth = NSWidth([tabStripView_ frame]); + // Account for the new tab button and the incognito badge. availableWidth -= NSWidth([newTabButton_ frame]) + kNewTabButtonOffset; + if (browser_->profile()->IsOffTheRecord()) + availableWidth -= kIncognitoBadgeTabStripShrink; } availableWidth -= [self indentForControls]; |