mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 23:50:47 +00:00
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:
parent
341653bcb0
commit
3dc7f6d74c
5 changed files with 329 additions and 209 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue