Jelajahi Sumber

【综合】夜间模式适配问题

dinglingui 1 Minggu lalu
induk
melakukan
2b61905986
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      PDF Office/PDF Master/AppDelegate.swift

+ 2 - 2
PDF Office/PDF Master/AppDelegate.swift

@@ -420,9 +420,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
     @objc private func _themeChanged(_ sender: Notification) {
         let isDarkModel = KMAdvertisementConfig.isDarkModel()
         if isDarkModel {
-            NSApp.appearance = .init(named: .darkAqua)
+            NSApp.appearance = NSAppearance(named: .darkAqua)
         } else {
-            NSApp.appearance = .init(named: .aqua)
+            NSApp.appearance = NSAppearance(named: .aqua)
         }
 //        if let data = NSApp.appearance?.name, data == .darkAqua {
 //            NSApp.appearance = .init(named: .aqua)