ComPDFUIConfig.swift 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. //
  2. // ComPDFUIConfig.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by wanjun on 2023/10/11.
  6. //
  7. import Cocoa
  8. class ComPDFUIConfig: NSObject {
  9. class func initializeUIConfig() {
  10. if let initialUserDefaultsURL = Bundle.main.url(forResource: "InitialUserDefaults", withExtension: "plist"),
  11. let initialUserDefaultsDict = NSDictionary(contentsOf: initialUserDefaultsURL) as? [String: Any],
  12. let initialValuesDict = initialUserDefaultsDict["RegisteredDefaults"] as? [String: Any] {
  13. // Set the defaults in the standard user defaults
  14. UserDefaults.standard.register(defaults: initialValuesDict)
  15. UserDefaults.standard.setPDFListViewColor(NSColor.black, forKey: CFreeTextNoteFontColorKey)
  16. NSImage.makePDFListViewCursorImages()
  17. CPDFListViewConfig.defaultManager.annotationBorderOffset = 2
  18. CPDFListViewConfig.defaultManager.annotationBorderColor = NSColor(red: 23.0/255.0, green: 112.0/255.0, blue: 244.0/255.0, alpha: 1.0)
  19. CPDFKitConfig.sharedInstance().isShowFormRequiredFlagColor = false
  20. CPDFListViewConfig.defaultManager.isSaveDefault = true
  21. }
  22. }
  23. }