|
@@ -102,14 +102,24 @@ class KMEditImagePropertyViewController: NSViewController {
|
|
|
|
|
|
@objc func changeEffectiveAppearance() {
|
|
|
print("changeEffectiveAppearance")
|
|
|
- self.view.appearance = NSAppearance(named: .aqua)
|
|
|
-
|
|
|
+ let isDarkModel = NSView.isDarkModel()
|
|
|
+ if isDarkModel {
|
|
|
+ self.view.appearance = NSAppearance(named: .darkAqua)
|
|
|
+ } else {
|
|
|
+ self.view.appearance = NSAppearance(named: .aqua)
|
|
|
+ }
|
|
|
self.updateUI()
|
|
|
}
|
|
|
|
|
|
func updateUI() {
|
|
|
- self.backgroundView.backgroundColor(NSColor.km_init(hex: "#FAFAFA"))
|
|
|
- self.noBackgroundView.backgroundColor(NSColor.km_init(hex: "#F7F8FA"))
|
|
|
+ let isDarkModel = NSView.isDarkModel()
|
|
|
+ if isDarkModel {
|
|
|
+ self.backgroundView.backgroundColor(NSColor.km_init(hex: "#252526"))
|
|
|
+ self.noBackgroundView.backgroundColor(NSColor.km_init(hex: "#252526"))
|
|
|
+ } else {
|
|
|
+ self.backgroundView.backgroundColor(NSColor.km_init(hex: "#FAFAFA"))
|
|
|
+ self.noBackgroundView.backgroundColor(NSColor.km_init(hex: "#F7F8FA"))
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
deinit {
|