41 lines
794 B
Swift
41 lines
794 B
Swift
//
|
|
// ReaderMac.swift
|
|
// ReaderMac
|
|
//
|
|
// Created by Shadowfacts on 1/16/22.
|
|
//
|
|
|
|
import AppKit
|
|
|
|
class ReaderMac: NSObject {
|
|
|
|
private(set) static var shared: ReaderMac!
|
|
|
|
override init() {
|
|
if ReaderMac.shared != nil {
|
|
fatalError()
|
|
}
|
|
|
|
super.init()
|
|
|
|
ReaderMac.shared = self
|
|
}
|
|
|
|
@objc func setup() {
|
|
}
|
|
|
|
@objc func updateAppearance(_ appearance: NSNumber) {
|
|
switch appearance {
|
|
case 0:
|
|
NSApp.appearance = nil
|
|
case 1:
|
|
NSApp.appearance = NSAppearance(named: .aqua)
|
|
case 2:
|
|
NSApp.appearance = NSAppearance(named: .darkAqua)
|
|
default:
|
|
fatalError("unexpected appeaerance value: \(appearance)")
|
|
}
|
|
}
|
|
|
|
}
|