Permalink
Browse files

Fixed fullscreen grey bar bug

  • Loading branch information...
torjue committed Mar 11, 2012
1 parent 29403c7 commit 5b3a72ab6f16277808c36a423e621509dbed20db
Showing with 6 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +5 −1 MacGap/Classes/ContentView.m
View
@@ -1 +1,2 @@
.DS_Store
+*xcuserdata*
@@ -56,7 +56,11 @@ - (void) windowResized:(NSNotification*)notification;
NSSize size = [window frame].size;
DebugNSLog(@"window width = %f, window height = %f", size.width, size.height);
- [self.webView setFrame:NSMakeRect(0, 0, size.width, size.height - [[Utils sharedInstance] titleBarHeight:window])];
+
+ bool isFullScreen = (window.styleMask & NSFullScreenWindowMask) == NSFullScreenWindowMask;
+ int titleBarHeight = isFullScreen ? 0 : [[Utils sharedInstance] titleBarHeight:window];
+
+ [self.webView setFrame:NSMakeRect(0, 0, size.width, size.height - titleBarHeight)];
[self triggerEvent:@"orientationchange"];
}

1 comment on commit 5b3a72a

@subtleGradient

This comment has been minimized.

Show comment Hide comment
@subtleGradient

subtleGradient May 30, 2012

Awesome!

Awesome!

Please sign in to comment.