/// Path to log text file.
@property (nonatomic, copy, readonly) HBOutputFileWriter *outputFile;
+@property (nonatomic, readonly) NSDictionary *textAttributes;
+
@end
@implementation HBOutputPanelController
[[textView enclosingScrollView] setLineScroll:10];
[[textView enclosingScrollView] setPageScroll:20];
+ // Text attributes
+ _textAttributes = @{NSForegroundColorAttributeName: [NSColor textColor]};
+
// Add ourself as stderr/stdout listener
[[HBOutputRedirect stderrRedirect] addListener:self];
[[HBOutputRedirect stdoutRedirect] addListener:self];
*/
- (void)stderrRedirect:(NSString *)text
{
- NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:text];
+ NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:text attributes:_textAttributes];
/* Actually write the libhb output to the text view (outputTextStorage) */
[outputTextStorage appendAttributedString:attributedString];