Revert to defaultParagraphStyle tab stops from 10 years ago (#272)

* Uncomment defaultParagraphStyle tab stop defaults from 10 years ago.

* move creation of tab stops for defaultParagraphStyle into the init method

* Update ChangeLog

* fix build error

* Update ChangeLog
This commit is contained in:
Adam Fox 2024-05-13 10:47:42 -06:00 committed by GitHub
parent 82dce67eb4
commit ae6323b042
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 13 deletions

View file

@ -1,3 +1,9 @@
2024-05-13 Adam Fox <adam.fox@keysight.com>
* Source/NSParagraphStyle.m (-init): Apply the old default
tab stop behavior from +defaultParagraphStyle to -init,
and therefore also to +defaultParagraphStyle.
2024-03-18 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m: Add support for NSFilenamenPboardType.

View file

@ -214,19 +214,6 @@ static NSParagraphStyle *defaultStyle = nil;
if (defaultStyle == nil)
{
NSParagraphStyle *style = [[self alloc] init];
/*
int i;
for (i = 0; i < 12; i++)
{
NSTextTab *tab;
tab = [[NSTextTab alloc] initWithType: NSLeftTabStopType
location: (i + 1) * 28.0];
[style->_tabStops addObject: tab];
RELEASE(tab);
}
*/
defaultStyle = style;
}
return defaultStyle;
@ -292,6 +279,8 @@ static NSParagraphStyle *defaultStyle = nil;
{
if ((self = [super init]))
{
int i;
_alignment = NSNaturalTextAlignment;
//_firstLineHeadIndent = 0.0;
//_headIndent = 0.0;
@ -304,6 +293,16 @@ static NSParagraphStyle *defaultStyle = nil;
_baseDirection = NSWritingDirectionNaturalDirection;
_tabStops = [[NSMutableArray allocWithZone: [self zone]]
initWithCapacity: 12];
for (i = 0; i < 12; i++)
{
NSTextTab *tab;
tab = [[NSTextTab alloc] initWithType: NSLeftTabStopType
location: (i + 1) * 28.0];
[_tabStops addObject: tab];
RELEASE(tab);
}
}
return self;
}