|
|
@@ -86,5 +86,18 @@ class ViewController: NSViewController, NSTextViewDelegate { |
|
|
|
print("ERROR loading: \(err)") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func toggle(isNight: Bool) { |
|
|
|
let darkBG = NSColor(red:0.13, green:0.13, blue:0.13, alpha:1.0) |
|
|
|
if isNight { |
|
|
|
self.view.window!.backgroundColor = darkBG |
|
|
|
self.writerText.backgroundColor = darkBG |
|
|
|
self.writerText.textColor = NSColor.white |
|
|
|
} else { |
|
|
|
self.view.window!.backgroundColor = NSColor.white |
|
|
|
self.writerText.backgroundColor = NSColor.white |
|
|
|
self.writerText.textColor = NSColor.black |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|