From 39a7eca1956777a96ab04ecf76114cf16537dc29 Mon Sep 17 00:00:00 2001 From: Lukhnos Liu Date: Tue, 20 Nov 2018 21:47:30 -0800 Subject: [PATCH] Fix license text for dark mode --- Source/Installer/AppDelegate.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Installer/AppDelegate.m b/Source/Installer/AppDelegate.m index f058f5ab..d08e9f05 100644 --- a/Source/Installer/AppDelegate.m +++ b/Source/Installer/AppDelegate.m @@ -60,8 +60,11 @@ static const NSTimeInterval kTranslocationRemovalDeadline = 60.0; NSAttributedString *attrStr = [[[NSAttributedString alloc] initWithRTF:[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"License" ofType:@"rtf"]] documentAttributes:NULL] autorelease]; - [[self.textView textStorage] setAttributedString:attrStr]; - + NSMutableAttributedString *mutableAttrStr = [[attrStr mutableCopy] autorelease]; + [mutableAttrStr addAttribute:NSForegroundColorAttributeName value:[NSColor controlTextColor] range:NSMakeRange(0, [mutableAttrStr length])]; + [[self.textView textStorage] setAttributedString:mutableAttrStr]; + [self.textView setSelectedRange:NSMakeRange(0, 0)]; + NSBundle *installingBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:kTargetBin ofType:kTargetType]]; _installingVersion = [[[installingBundle infoDictionary] objectForKey:(id)kCFBundleVersionKey] retain]; NSString *versionString = [[installingBundle infoDictionary] objectForKey:@"CFBundleShortVersionString"];