diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 20:12:50 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 20:12:50 +0000 |
commit | c4f0ed1562c5f4f021b17f1d371f77f955968561 (patch) | |
tree | 3a9724883d519a2b2be43e795cababb1fdfe8758 /chrome/browser/cocoa/browser_window_controller.mm | |
parent | dabc3e84a78f0438785e892cf56b4c94cc8d22c3 (diff) | |
download | chromium_src-c4f0ed1562c5f4f021b17f1d371f77f955968561.zip chromium_src-c4f0ed1562c5f4f021b17f1d371f77f955968561.tar.gz chromium_src-c4f0ed1562c5f4f021b17f1d371f77f955968561.tar.bz2 |
Make tabs go all the way to the right edge and stop using less of the strip as more tabs are added. Don't resize on selection when tabs are very small, except just enough to show a close box. Clip closebox and favicon as tab gets very small. Fix z-order to be consistent among all unselected tabs. Fix incognito man disappearing when dragging window via the tab. Tabs can now get about as small as they do on windows allowing many more to fit.
BUG=14911, 14913, 17372
TEST=adding and removing lots of tabs and making sure nothing goes wrong.
Review URL: http://codereview.chromium.org/159206
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_window_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/browser_window_controller.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm index ac8278e..ce68077 100644 --- a/chrome/browser/cocoa/browser_window_controller.mm +++ b/chrome/browser/cocoa/browser_window_controller.mm @@ -69,7 +69,6 @@ const int kWindowGradientHeight = 24; - (void)positionInfoBar; - (void)positionBar; // toolbar or URL bar - (void)removeBar; // toolbar or URL bar -- (void)installIncognitoBadge; // Leopard's gradient heuristic gets confused by our tabs and makes the title // gradient jump when creating a tab that is less than a tab width from the @@ -933,7 +932,7 @@ willPositionSheet:(NSWindow*)sheet scoped_nsobject<NSImage> incognitoImage( [[NSImage alloc] initWithContentsOfFile:incognitoPath]); const NSSize imageSize = [incognitoImage size]; - const NSRect tabFrame = [[self tabStripView] frame]; + NSRect tabFrame = [[self tabStripView] frame]; NSRect incognitoFrame = tabFrame; incognitoFrame.origin.x = NSMaxX(incognitoFrame) - imageSize.width - kOffset; @@ -948,6 +947,11 @@ willPositionSheet:(NSWindow*)sheet [shadow setShadowOffset:NSMakeSize(0, -1)]; [shadow setShadowBlurRadius:2.0]; [incognitoView setShadow:shadow]; + + // Shrink the tab strip's width so there's no overlap and install the + // view. + tabFrame.size.width -= incognitoFrame.size.width + kOffset; + [[self tabStripView] setFrame:tabFrame]; [[[[self window] contentView] superview] addSubview:incognitoView.get()]; } |