Browse Source

Update colors for text in 11.0

pull/92/head
Abhishek 4 years ago
parent
commit
8513fc472e
  1. 12
      Clocker/Menu Bar/StatusItemView.swift

12
Clocker/Menu Bar/StatusItemView.swift

@ -14,7 +14,11 @@ var compactModeTimeFont: NSFont {
} }
var timeAttributes: [NSAttributedString.Key: AnyObject] { 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 = [ let attributes = [
NSAttributedString.Key.font: compactModeTimeFont, NSAttributedString.Key.font: compactModeTimeFont,
@ -35,7 +39,11 @@ class StatusItemView: NSView {
} }
private var textFontAttributes: [NSAttributedString.Key: Any] { 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 = [ let textFontAttributes = [
NSAttributedString.Key.font: NSFont.boldSystemFont(ofSize: 10), NSAttributedString.Key.font: NSFont.boldSystemFont(ofSize: 10),

Loading…
Cancel
Save