|
|
@@ -12,6 +12,7 @@ class ViewController: NSViewController, NSTextViewDelegate, NSUserNotificationCe |
|
|
|
|
|
|
|
@IBOutlet var writerText: NSTextView! |
|
|
|
|
|
|
|
var isNight = false |
|
|
|
|
|
|
|
override func viewDidLoad() { |
|
|
|
super.viewDidLoad() |
|
|
@@ -30,6 +31,15 @@ class ViewController: NSViewController, NSTextViewDelegate, NSUserNotificationCe |
|
|
|
writerText.delegate = self |
|
|
|
} |
|
|
|
|
|
|
|
override func viewWillAppear() { |
|
|
|
super.viewWillAppear() |
|
|
|
|
|
|
|
self.view.window!.titlebarAppearsTransparent = true |
|
|
|
self.view.window!.isMovableByWindowBackground = true |
|
|
|
self.view.window!.titleVisibility = .hidden |
|
|
|
toggle(isNight: isNight) |
|
|
|
} |
|
|
|
|
|
|
|
override func viewDidAppear() { |
|
|
|
super.viewDidAppear() |
|
|
|
|
|
|
@@ -37,10 +47,6 @@ class ViewController: NSViewController, NSTextViewDelegate, NSUserNotificationCe |
|
|
|
|
|
|
|
// Style the window |
|
|
|
self.view.window!.title = "Write.as" |
|
|
|
self.view.window!.titlebarAppearsTransparent = true |
|
|
|
self.view.window!.isMovableByWindowBackground = true |
|
|
|
self.view.window!.titleVisibility = .hidden |
|
|
|
self.view.window!.backgroundColor = NSColor.white |
|
|
|
} |
|
|
|
|
|
|
|
func configureWindow() { |
|
|
@@ -172,6 +178,7 @@ class ViewController: NSViewController, NSTextViewDelegate, NSUserNotificationCe |
|
|
|
self.writerText.backgroundColor = NSColor.white |
|
|
|
self.writerText.textColor = NSColor.black |
|
|
|
} |
|
|
|
self.isNight = isNight |
|
|
|
} |
|
|
|
|
|
|
|
func adjustTextSize(increment: Bool) { |
|
|
|