Skip to content

Commit

Permalink
Fixed fullscreen grey bar bug
Browse files Browse the repository at this point in the history
  • Loading branch information
torjue committed Mar 11, 2012
1 parent 29403c7 commit 5b3a72a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
.DS_Store .DS_Store
*xcuserdata*
6 changes: 5 additions & 1 deletion MacGap/Classes/ContentView.m
Expand Up @@ -56,7 +56,11 @@ - (void) windowResized:(NSNotification*)notification;
NSSize size = [window frame].size; NSSize size = [window frame].size;


DebugNSLog(@"window width = %f, window height = %f", size.width, size.height); 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"]; [self triggerEvent:@"orientationchange"];
} }


Expand Down

1 comment on commit 5b3a72a

@subtleGradient
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Please sign in to comment.