Fix for issue with resize when using in-window menus.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37698 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2014-02-20 23:49:37 +00:00
parent e941843120
commit a3f2d12641
2 changed files with 18 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-02-20 18:48-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSWindow.m: (-setFrame:): Correct window resize when
in window menus are used and size constraints on the window don't
allow it to accommodate the menu.
2014-02-18 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m (-insertText:): Ignore nil argument.

View file

@ -2173,9 +2173,20 @@ titleWithRepresentedFilename(NSString *representedFilename)
frameRect.size.width = _maximumSize.width;
}
if (_maximumSize.height > 0 && frameRect.size.height > _maximumSize.height)
{
NSInterfaceStyle style =
NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil);
if (style != NSWindows95InterfaceStyle)
{
frameRect.size.height = _maximumSize.height;
}
else
{
float menuHeight = [[GSTheme theme] menuHeightForWindow:self];
frameRect.size.height = _maximumSize.height + menuHeight;
}
}
if (frameRect.size.width < _minimumSize.width)
{
frameRect.size.width = _minimumSize.width;