From 11449b2e8cdf95594488220c8a46ff22ccb54708 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Nov 2016 09:36:23 -0800 Subject: [PATCH] Convert about credits to NSAttributedString --- atom/browser/browser_mac.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/atom/browser/browser_mac.mm b/atom/browser/browser_mac.mm index 4c4462f7bc56..960522b8c7c1 100644 --- a/atom/browser/browser_mac.mm +++ b/atom/browser/browser_mac.mm @@ -255,6 +255,16 @@ void Browser::DockSetIcon(const gfx::Image& image) { void Browser::ShowAboutPanel() { NSDictionary* options = DictionaryValueToNSDictionary(about_panel_options_); + + // Credits must be a NSAttributedString instead of NSString + id credits = options[@"Credits"]; + if (credits != nil) { + NSMutableDictionary* mutable_options = [options mutableCopy]; + mutable_options[@"Credits"] = [[[NSAttributedString alloc] + initWithString:(NSString*)credits] autorelease]; + options = [NSDictionary dictionaryWithDictionary:mutable_options]; + } + [[AtomApplication sharedApplication] orderFrontStandardAboutPanelWithOptions:options]; }