mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Set the TextConatainer to track its view
again. But switch this of if the view is scrollable. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7997 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
83c9ff711e
commit
1cfbd9caf3
1 changed files with 10 additions and 7 deletions
|
@ -59,7 +59,7 @@
|
|||
#include <AppKit/NSLayoutManager.h>
|
||||
|
||||
|
||||
#define HUGE 1e99
|
||||
#define HUGE 1e7
|
||||
|
||||
|
||||
static NSNotificationCenter *nc;
|
||||
|
@ -884,9 +884,16 @@ NSRange MakeRangeFromAbs (unsigned a1, unsigned a2)
|
|||
|
||||
- (void)setHorizontallyResizable: (BOOL)flag
|
||||
{
|
||||
[_textContainer setWidthTracksTextView: !flag];
|
||||
_tf.is_horizontally_resizable = flag;
|
||||
}
|
||||
|
||||
- (void) setVerticallyResizable: (BOOL)flag
|
||||
{
|
||||
[_textContainer setHeightTracksTextView: !flag];
|
||||
_tf.is_vertically_resizable = flag;
|
||||
}
|
||||
|
||||
- (void)setMaxSize: (NSSize)newMaxSize
|
||||
{
|
||||
_maxSize = newMaxSize;
|
||||
|
@ -897,11 +904,6 @@ NSRange MakeRangeFromAbs (unsigned a1, unsigned a2)
|
|||
_minSize = newMinSize;
|
||||
}
|
||||
|
||||
- (void) setVerticallyResizable: (BOOL)flag
|
||||
{
|
||||
_tf.is_vertically_resizable = flag;
|
||||
}
|
||||
|
||||
- (void) sizeToFit
|
||||
{
|
||||
// if we are a field editor we don't have to handle the size.
|
||||
|
@ -1314,7 +1316,6 @@ NSRange MakeRangeFromAbs (unsigned a1, unsigned a2)
|
|||
{
|
||||
NSRange drawnRange = [_layoutManager glyphRangeForBoundingRect: rect
|
||||
inTextContainer: [self textContainer]];
|
||||
|
||||
if (_tf.draws_background)
|
||||
{
|
||||
[_layoutManager drawBackgroundForGlyphRange: drawnRange
|
||||
|
@ -1558,6 +1559,8 @@ NSRange MakeRangeFromAbs (unsigned a1, unsigned a2)
|
|||
//[self setSelectedRange: NSMakeRange (0, 0)];
|
||||
|
||||
[aTextContainer setTextView: (NSTextView*)self];
|
||||
[aTextContainer setWidthTracksTextView: YES];
|
||||
[aTextContainer setHeightTracksTextView: YES];
|
||||
[self sizeToFit];
|
||||
|
||||
return self;
|
||||
|
|
Loading…
Reference in a new issue