]> granicus.if.org Git - handbrake/commitdiff
MaGui: fix activity text color in dark mode.
authorDamiano Galassi <damiog@gmail.com>
Thu, 7 Jun 2018 12:28:07 +0000 (14:28 +0200)
committerDamiano Galassi <damiog@gmail.com>
Thu, 7 Jun 2018 12:28:07 +0000 (14:28 +0200)
macosx/HBOutputPanelController.m

index 4b09f3cc42b611d39a1c926c382c265fc3be7e39..1150e193947cc42f28b5769b7f47aab9287d5a70 100644 (file)
@@ -29,6 +29,8 @@
 /// Path to log text file.
 @property (nonatomic, copy, readonly) HBOutputFileWriter *outputFile;
 
+@property (nonatomic, readonly) NSDictionary *textAttributes;
+
 @end
 
 @implementation HBOutputPanelController
@@ -64,6 +66,9 @@
         [[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];