Skip to content

Commit

Permalink
Fix NSAttributedString deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
fxcoudert committed Jun 20, 2022
1 parent 85c11b7 commit 8846086
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions macosx/AboutWindowController.mm
Expand Up @@ -38,9 +38,11 @@ - (void)awakeFromNib
self.fCopyrightField.stringValue = [NSBundle.mainBundle localizedStringForKey:@"NSHumanReadableCopyright" value:nil
table:@"InfoPlist"];

[self.fTextView.textStorage
setAttributedString:[[NSAttributedString alloc] initWithPath:[NSBundle.mainBundle pathForResource:@"Credits" ofType:@"rtf"]
documentAttributes:nil]];
NSAttributedString *credits = [[NSAttributedString alloc] initWithURL:[NSBundle.mainBundle URLForResource:@"Credits" withExtension:@"rtf"]
options:@{NSDocumentTypeDocumentAttribute: NSRTFTextDocumentType}
documentAttributes:nil
error:nil];
[self.fTextView.textStorage setAttributedString:credits];

//size license button
CGFloat const oldButtonWidth = NSWidth(self.fLicenseButton.frame);
Expand Down

0 comments on commit 8846086

Please sign in to comment.