Little window fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4647 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-07-25 11:54:26 +00:00
parent 60a18ede5b
commit c36401836d
2 changed files with 8 additions and 3 deletions

View file

@ -4,6 +4,7 @@ Sun Jul 25 11:40:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
([-replaceCharactersinRange:withString:]) to call
([-edited:range:changeInLength:) on completion.
* Source/NSTextStorage.m: likewise.
* Source/NSWindow.m: make minimum window size 1 by 1.
1999-07-24 Michael Hanni <mhanni@sprintmail.com>

View file

@ -257,7 +257,7 @@ static NSRecursiveLock *windowsLock;
style_mask = aStyle;
frame = [NSWindow frameRectForContentRect: contentRect styleMask: aStyle];
minimum_size = NSZeroSize;
minimum_size = NSMakeSize(1, 1);
maximum_size = r.size;
[self setNextResponder: NSApp];
@ -677,11 +677,11 @@ static NSRecursiveLock *windowsLock;
{
frameRect.size.height = maximum_size.height;
}
if (minimum_size.width > 0 && frameRect.size.width < minimum_size.width)
if (frameRect.size.width < minimum_size.width)
{
frameRect.size.width = minimum_size.width;
}
if (minimum_size.height > 0 && frameRect.size.height < minimum_size.height)
if (frameRect.size.height < minimum_size.height)
{
frameRect.size.height = minimum_size.height;
}
@ -725,6 +725,10 @@ static NSRecursiveLock *windowsLock;
- (void) setMinSize: (NSSize)aSize
{
if (aSize.width < 1)
aSize.width = 1;
if (aSize.height < 1)
aSize.height = 1;
minimum_size = aSize;
}