From 40fe17b6d65b204503d3fb7467bc91c31817449c Mon Sep 17 00:00:00 2001 From: FredKiefer Date: Mon, 6 Nov 2000 22:12:29 +0000 Subject: [PATCH] In [setVerticallyResizable:] and [setHorizontallyResizable:] set the size of the text conatainer. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8062 72102866-910b-0410-8b05-ffd578937521 --- Source/NSText.m | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Source/NSText.m b/Source/NSText.m index e8bbf50a9..79e655620 100644 --- a/Source/NSText.m +++ b/Source/NSText.m @@ -879,12 +879,32 @@ NSRange MakeRangeFromAbs (unsigned a1, unsigned a2) - (void)setHorizontallyResizable: (BOOL)flag { + // FIXME: All the container resizing is here preliminary until we get + // clipview resizing working without it + NSSize containerSize = [_textContainer containerSize]; + + if (flag) + containerSize.width = HUGE; + else + containerSize.width = _frame.size.width - 2.0 * [self textContainerInset].width; + + [_textContainer setContainerSize: containerSize]; [_textContainer setWidthTracksTextView: !flag]; _tf.is_horizontally_resizable = flag; } - (void) setVerticallyResizable: (BOOL)flag { + // FIXME: All the container resizing is here preliminary until we get + // clipview resizing working without it + NSSize containerSize = [_textContainer containerSize]; + + if (flag) + containerSize.height = HUGE; + else + containerSize.height = _frame.size.height - 2.0 * [self textContainerInset].height; + + [_textContainer setContainerSize: containerSize]; [_textContainer setHeightTracksTextView: !flag]; _tf.is_vertically_resizable = flag; }