Merge pull request #7979 from electron/credits-attributed-string
Convert about credits to NSAttributedString
This commit is contained in:
commit
cb0845fc49
1 changed files with 10 additions and 0 deletions
|
@ -255,6 +255,16 @@ void Browser::DockSetIcon(const gfx::Image& image) {
|
||||||
|
|
||||||
void Browser::ShowAboutPanel() {
|
void Browser::ShowAboutPanel() {
|
||||||
NSDictionary* options = DictionaryValueToNSDictionary(about_panel_options_);
|
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]
|
[[AtomApplication sharedApplication]
|
||||||
orderFrontStandardAboutPanelWithOptions:options];
|
orderFrontStandardAboutPanelWithOptions:options];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue