mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:20:47 +00:00
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
This commit is contained in:
parent
d8c43999c1
commit
c29b53732f
1 changed files with 20 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue