mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 04:50:47 +00:00
Adjust the minimum and maximum sizes of a NSTextView to ensure that
the minimum size is not greater than the current size and the maximum size is not smaller than the current size. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34362 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bf52affd57
commit
1c792c4b66
2 changed files with 23 additions and 0 deletions
|
@ -1994,6 +1994,22 @@ before this TODO can be removed
|
|||
}
|
||||
}
|
||||
|
||||
- (void) resizeSubviewsWithOldSize: (NSSize)oldSize
|
||||
{
|
||||
NSSize curSize = [self frame].size;
|
||||
|
||||
if (_minSize.width > curSize.width)
|
||||
_minSize.width = curSize.width;
|
||||
if (_minSize.height > curSize.height)
|
||||
_minSize.height = curSize.height;
|
||||
|
||||
if (_maxSize.width < curSize.width)
|
||||
_maxSize.width = curSize.width;
|
||||
if (_maxSize.height < curSize.height)
|
||||
_maxSize.height = curSize.height;
|
||||
|
||||
[super resizeSubviewsWithOldSize: oldSize];
|
||||
}
|
||||
|
||||
|
||||
/**** Text container origin ****/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue