From 6365fa51275e48f75366f82da44f5cd905a783af Mon Sep 17 00:00:00 2001 From: Wolfgang Lux Date: Fri, 2 Dec 2011 21:36:58 +0000 Subject: [PATCH] Reinstate Fred's change with the additional correction to the string drawing code he proposed on the mailing list. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34241 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 ++++++++ Source/NSStringDrawing.m | 1 + Source/NSTextContainer.m | 2 +- Source/NSTextView.m | 1 - 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1635e447b..e86418650 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-12-02 Wolfgang Lux + + * Source/NSTextView.m (-buildUpTextNetwork:): + * Source/NSTextContainer.m (-initWithContainerSize): + * Source/NSStringDrawing.m (init_string_drawing): + Reinstate Fred's change with the additional correction to the + string drawing code he proposed on the mailing list. + 2011-12-01 Eric Wasylishen * Source/NSTextView.m diff --git a/Source/NSStringDrawing.m b/Source/NSStringDrawing.m index 33aa04d31..13f4525f4 100644 --- a/Source/NSStringDrawing.m +++ b/Source/NSStringDrawing.m @@ -133,6 +133,7 @@ static void init_string_drawing(void) [layoutManager release]; textContainer = [[NSTextContainer alloc] initWithContainerSize: NSMakeSize(10, 10)]; + [textContainer setLineFragmentPadding: 0]; [layoutManager addTextContainer: textContainer]; [textContainer release]; diff --git a/Source/NSTextContainer.m b/Source/NSTextContainer.m index dd30d468c..03de861ac 100644 --- a/Source/NSTextContainer.m +++ b/Source/NSTextContainer.m @@ -108,7 +108,7 @@ use bounds rectangle instead of frame? */ _textView = nil; _containerRect.size = aSize; // Tests on Cocoa indicate the default value is 5. - _lineFragmentPadding = 0.0; // 5.0; + _lineFragmentPadding = 5.0; _observingFrameChanges = NO; _widthTracksTextView = NO; _heightTracksTextView = NO; diff --git a/Source/NSTextView.m b/Source/NSTextView.m index 9677e118e..00e96f188 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -697,7 +697,6 @@ If a text view is added to an empty text network, it keeps its attributes. RELEASE(layoutManager); textContainer = [[NSTextContainer alloc] initWithContainerSize: aSize]; - [textContainer setLineFragmentPadding: 5.0]; // Observed default on Mac OS X/Cocoa for textfields. [layoutManager addTextContainer: textContainer]; RELEASE(textContainer);