mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Ensure a more consistent initial setup of a new NSTextView and its
text container. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30495 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
027baea2fa
commit
724a198f41
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTextView.m (-initWithFrame:, -initWithFrame:textContainer:):
|
||||
Ensure a more consistent initial setup of a new text view and its
|
||||
text container.
|
||||
|
||||
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTextView.m (-initWithCoder:, -initWithTextView:,
|
||||
|
|
|
@ -706,7 +706,7 @@ If a text view is added to an empty text network, it keeps its attributes.
|
|||
|
||||
_tf.draws_background = YES;
|
||||
_tf.is_horizontally_resizable = NO;
|
||||
_tf.is_vertically_resizable = YES;
|
||||
_tf.is_vertically_resizable = NO;
|
||||
|
||||
/* We set defaults for all shared attributes here. If container is already
|
||||
part of a text network, we reset the attributes in -setTextContainer:. */
|
||||
|
@ -744,9 +744,12 @@ If a text view is added to an empty text network, it keeps its attributes.
|
|||
{
|
||||
NSTextContainer *aTextContainer;
|
||||
|
||||
aTextContainer = [self buildUpTextNetwork: frameRect.size];
|
||||
NSSize containerSize = NSMakeSize(NSWidth(frameRect), 1e7);
|
||||
aTextContainer = [self buildUpTextNetwork: containerSize];
|
||||
|
||||
self = [self initWithFrame: frameRect textContainer: aTextContainer];
|
||||
[self setVerticallyResizable: YES];
|
||||
[aTextContainer setWidthTracksTextView: YES];
|
||||
|
||||
/* At this point the situation is as follows:
|
||||
|
||||
|
|
Loading…
Reference in a new issue