Set the text container to max size, when the text view is resizable.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25863 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-01-04 21:02:29 +00:00
parent f821207b3b
commit 0c7b8fad15
5 changed files with 329 additions and 209 deletions

View file

@ -1612,13 +1612,34 @@ incorrectly. */
{
/* Safety call */
[_textContainer setWidthTracksTextView: !flag];
if (flag)
{
NSSize size;
NSSize inset;
inset = [self textContainerInset];
size = [_textContainer containerSize];
size.width = MAX(_maxSize.width - (inset.width * 2.0), 0.0);
[_textContainer setContainerSize: size];
}
_tf.is_horizontally_resizable = flag;
}
- (void) setVerticallyResizable: (BOOL)flag
{
/* Safety call */
[_textContainer setHeightTracksTextView: !flag];
if (flag)
{
NSSize size;
NSSize inset;
inset = [self textContainerInset];
size = [_textContainer containerSize];
size.height = MAX(_maxSize.height - (inset.height * 2.0), 0.0);
[_textContainer setContainerSize: size];
}
_tf.is_vertically_resizable = flag;
}