123456789101112131415161718192021222324252627282930313233 |
- //
- // ComPDFUIConfig.swift
- // PDF Master
- //
- // 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)
-
- // App启动后,恢复部分设置
- KMPreferenceManager.shared.resumeDataToPDFView()
- 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
- }
- }
- }
|