summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/browser_window_controller.mm
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 18:06:29 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 18:06:29 +0000
commit0b1deee47c4f94f85f5804fbcee3f75b51cb952a (patch)
tree726b082f4c87167959a7fef928d35be52f22ab83 /chrome/browser/cocoa/browser_window_controller.mm
parente1432a0b5453ed1261be7e8f8fae9ac75cbb952f (diff)
downloadchromium_src-0b1deee47c4f94f85f5804fbcee3f75b51cb952a.zip
chromium_src-0b1deee47c4f94f85f5804fbcee3f75b51cb952a.tar.gz
chromium_src-0b1deee47c4f94f85f5804fbcee3f75b51cb952a.tar.bz2
Mac: make tab strip taller in fullscreen mode (still disabled).
Make enough room so that the main menu (which also slides down) doesn't overlap the tabs. BUG=31638 TEST=none (things should work normally in normal mode; unit tests should pass) Review URL: http://codereview.chromium.org/603023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_window_controller.mm')
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index b086241..c646528 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -126,6 +126,10 @@ namespace {
const CGFloat kLocBarLeftRightInset = 1;
const CGFloat kLocBarTopInset = 0;
const CGFloat kLocBarBottomInset = 1;
+
+// The amount by which the floating bar is offset downwards (to avoid the menu)
+// in fullscreen mode.
+const CGFloat kFullscreenVerticalBarOffset = 14;
} // end namespace
@interface GTMTheme (BrowserThemeProviderInitialization)
@@ -2015,7 +2019,7 @@ willPositionSheet:(NSWindow*)sheet
if (![self isFullscreen])
return 0;
- CGFloat totalHeight = 0;
+ CGFloat totalHeight = kFullscreenVerticalBarOffset;
if ([self hasTabStrip])
totalHeight += NSHeight([[self tabStripView] frame]);
@@ -2042,6 +2046,10 @@ willPositionSheet:(NSWindow*)sheet
NSView* tabStripView = [self tabStripView];
CGFloat tabStripHeight = NSHeight([tabStripView frame]);
+ // In fullscreen mode, push the tab strip down so that the main menu (which
+ // also slides down) doesn't run it over.
+ if (fullscreen)
+ maxY -= kFullscreenVerticalBarOffset;
maxY -= tabStripHeight;
[tabStripView setFrame:NSMakeRect(0, maxY, width, tabStripHeight)];