Improve the exception text in dark mode.

This commit is contained in:
Damiano Galassi committed 2018-10-15 18:59:42 +02:00
1 parent 74b13be8d2
commit 928f941c4f
1 file changed
+4 -1
+4 -1
View File
@@ -16,13 +16,16 @@ static void CrashMyApplication()
- (NSAttributedString *)_formattedExceptionBacktrace:(NSArray *)backtrace
{
NSMutableAttributedString *result = [[NSMutableAttributedString alloc] init];
NSDictionary *textAttributes = @{NSForegroundColorAttributeName: NSColor.textColor,
NSFontAttributeName: [NSFont fontWithName:@"Monaco" size:10]};
for (__strong NSString *s in backtrace)
{
s = [s stringByAppendingString:@"\n"];
NSAttributedString *attrS = [[NSAttributedString alloc] initWithString:s];
[result appendAttributedString:attrS];
}
[result addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Monaco" size:10] range:NSMakeRange(0, result.length)];
[result addAttributes:textAttributes range:NSMakeRange(0, result.length)];
return result;
}