Cocoa Port:

- Fix one more bug related to main window positioning, which occurs when the status bar is shown when the main window is too large for the desktop content area.
This commit is contained in:
rogerman 2012-08-16 00:51:06 +00:00
parent d960b4c061
commit 874b469cf0
1 changed files with 6 additions and 1 deletions

View File

@ -1002,7 +1002,6 @@
if (showStatusBar)
{
statusBarHeight = WINDOW_STATUS_BAR_HEIGHT;
frameRect.origin.y -= WINDOW_STATUS_BAR_HEIGHT;
frameRect.size.height += WINDOW_STATUS_BAR_HEIGHT;
NSRect screenFrame = [[NSScreen mainScreen] visibleFrame];
@ -1012,8 +1011,14 @@
double widthToHeightRatio = windowContentRect.size.width / windowContentRect.size.height;
windowContentRect.size.height -= frameRect.size.height - screenFrame.size.height;
windowContentRect.size.width = windowContentRect.size.height * widthToHeightRatio;
frameRect.size.height = screenFrame.size.height;
frameRect.size.width = windowContentRect.size.width;
}
else
{
frameRect.origin.y -= WINDOW_STATUS_BAR_HEIGHT;
}
}
else
{