mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
Change the default text container inset for NSTextView to (0,0) to
reduce blank space around text. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34367 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b046febc21
commit
cc31ecbeda
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-12-29 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTextView.m(-initWithFrame:textContainer:,
|
||||
-setFieldEditor:): Change the default text container inset to
|
||||
(0,0) to reduce blank space around text.
|
||||
|
||||
2011-12-29 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSLayoutManager.m (-_insertionPointRectFor...,
|
||||
|
|
|
@ -718,7 +718,7 @@ If a text view is added to an empty text network, it keeps its attributes.
|
|||
|
||||
/* Designated initializer. */
|
||||
- (id) initWithFrame: (NSRect)frameRect
|
||||
textContainer: (NSTextContainer *)container
|
||||
textContainer: (NSTextContainer *)container
|
||||
{
|
||||
self = [super initWithFrame: frameRect];
|
||||
if (!self)
|
||||
|
@ -729,7 +729,7 @@ If a text view is added to an empty text network, it keeps its attributes.
|
|||
|
||||
_minSize = frameRect.size;
|
||||
_maxSize = NSMakeSize(frameRect.size.width, GSHUGE);
|
||||
_textContainerInset = NSMakeSize(2, 0);
|
||||
_textContainerInset = NSZeroSize;
|
||||
|
||||
ASSIGN(_insertionPointColor, [NSColor textColor]);
|
||||
ASSIGN(_backgroundColor, [NSColor textBackgroundColor]);
|
||||
|
@ -1405,14 +1405,12 @@ to make sure syncing is handled properly in all cases.
|
|||
{
|
||||
[self setHorizontallyResizable: NO]; /* TODO: why? */
|
||||
[self setVerticallyResizable: NO];
|
||||
[self setTextContainerInset: NSMakeSize(0,0)]; /* TODO: this is kind of ugly */
|
||||
[_textContainer setLineFragmentPadding: 0];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setHorizontallyResizable: NO]; /* TODO: why? */
|
||||
[self setVerticallyResizable: YES];
|
||||
[self setTextContainerInset: NSMakeSize(2,0)];
|
||||
[_textContainer setLineFragmentPadding: 5.0];
|
||||
}
|
||||
_tf.is_field_editor = flag;
|
||||
|
|
Loading…
Reference in a new issue