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:
Gregory John Casamento 2014-02-20 23:49:37 +00:00
parent cbc00992bf
commit 0b26fec21a
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

@ -2174,7 +2174,18 @@ titleWithRepresentedFilename(NSString *representedFilename)
}
if (_maximumSize.height > 0 && frameRect.size.height > _maximumSize.height)
{
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)
{