mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 14:41:56 +00:00
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:
parent
e941843120
commit
a3f2d12641
2 changed files with 18 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue