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