123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //
- // ComPDFUIConfig.m
- // ComPDFKit
- //
- // Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
- //
- // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
- // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
- // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
- // This notice may not be removed from this file.
- //
- #import "ComPDFUIConfig.h"
- #import <ComPDFKit/ComPDFKit.h>
- #import "NSImage+PDFListView.h"
- #import "CPDFListViewConfig.h"
- #if VERSION_DMG
- #import <PDF_Master-Swift.h>
- #else
- #import <PDF_Master-Swift.h>
- #endif
- @implementation ComPDFUIConfig
- + (void)initializeUIConfig {
- NSURL *initialUserDefaultsURL = [[NSBundle mainBundle] URLForResource:@"InitialUserDefaults" withExtension:@"plist"];
- NSDictionary *initialUserDefaultsDict = [NSDictionary dictionaryWithContentsOfURL:initialUserDefaultsURL];
- NSDictionary *initialValuesDict = [initialUserDefaultsDict objectForKey:@"RegisteredDefaults"];
-
- // set them in the standard user defaults
- [[NSUserDefaults standardUserDefaults] registerDefaults:initialValuesDict];
- // App 启动 恢复部分设置
- [[KMPreferenceManager shared] resumeDataToPDFView];
- [[NSUserDefaults standardUserDefaults] setPDFListViewColor:[NSColor blackColor] forKey:CFreeTextNoteFontColorKey];
- [NSImage makePDFListViewCursorImages];
-
- [CPDFListViewConfig defaultManager].annotationBorderOffset = @2;
- [CPDFListViewConfig defaultManager].annotationBorderColor = [NSColor colorWithRed:23.0/255.0 green:112.0/255.0 blue:244.0/255.0 alpha:1.0];
-
- [[CPDFKitConfig sharedInstance] setIsShowFormRequiredFlagColor:NO];
-
- [CPDFListViewConfig defaultManager].isSaveDefault = YES;
- }
- @end
|