|
|
@ -50,14 +50,11 @@ class Themer: NSObject { |
|
|
|
object: nil) |
|
|
|
object: nil) |
|
|
|
|
|
|
|
|
|
|
|
if #available(macOS 10.14, *) { |
|
|
|
if #available(macOS 10.14, *) { |
|
|
|
effectiveApperanceObserver = NSApp.observe(\.effectiveAppearance) { [weak self] _, _ in |
|
|
|
effectiveApperanceObserver = NSApp.observe(\.effectiveAppearance) { _, _ in |
|
|
|
if let sSelf = self { |
|
|
|
|
|
|
|
sSelf.setAppAppearance() |
|
|
|
|
|
|
|
NotificationCenter.default.post(name: .themeDidChangeNotification, object: nil) |
|
|
|
NotificationCenter.default.post(name: .themeDidChangeNotification, object: nil) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
extension Themer { |
|
|
|
extension Themer { |
|
|
@ -452,9 +449,11 @@ extension Themer { |
|
|
|
} else if themeIndex == .system { |
|
|
|
} else if themeIndex == .system { |
|
|
|
appAppearance = retrieveCurrentSystem() == .dark ? NSAppearance(named: .darkAqua) : NSAppearance(named: .aqua) |
|
|
|
appAppearance = retrieveCurrentSystem() == .dark ? NSAppearance(named: .darkAqua) : NSAppearance(named: .aqua) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if NSApp.appearance != appAppearance { |
|
|
|
NSApp.appearance = appAppearance |
|
|
|
NSApp.appearance = appAppearance |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func fallbackImageProvider(_ lightImage: NSImage, |
|
|
|
private func fallbackImageProvider(_ lightImage: NSImage, |
|
|
|
_ darkImage: NSImage, |
|
|
|
_ darkImage: NSImage, |
|
|
|