From 8513fc472e3f3ba6d2491c4bcb0cf9e2f4f60e8f Mon Sep 17 00:00:00 2001 From: Abhishek Date: Fri, 26 Jun 2020 21:21:18 -0500 Subject: [PATCH] Update colors for text in 11.0 --- Clocker/Menu Bar/StatusItemView.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Clocker/Menu Bar/StatusItemView.swift b/Clocker/Menu Bar/StatusItemView.swift index d3f14f4..a97ec4a 100644 --- a/Clocker/Menu Bar/StatusItemView.swift +++ b/Clocker/Menu Bar/StatusItemView.swift @@ -14,7 +14,11 @@ var compactModeTimeFont: NSFont { } var timeAttributes: [NSAttributedString.Key: AnyObject] { - let textColor = UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark" ? NSColor.white : NSColor.black + var textColor = UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark" ? NSColor.white : NSColor.black + + if #available(macOS 10.15, *) { + textColor = NSColor.white + } let attributes = [ NSAttributedString.Key.font: compactModeTimeFont, @@ -35,7 +39,11 @@ class StatusItemView: NSView { } private var textFontAttributes: [NSAttributedString.Key: Any] { - let textColor = UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark" ? NSColor.white : NSColor.black + var textColor = UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark" ? NSColor.white : NSColor.black + + if #available(macOS 10.15, *) { + textColor = NSColor.white + } let textFontAttributes = [ NSAttributedString.Key.font: NSFont.boldSystemFont(ofSize: 10),