mirror of
https://github.com/electron/electron.git
synced 2026-01-25 07:18:18 -05:00
Convert about credits to NSAttributedString
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user