Browse Source

Merge branch 'develop_PDFReaderProV4.6.0' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProV4.6.0

tangchao 6 months ago
parent
commit
440c9eb890

+ 7 - 7
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationModel.m

@@ -2235,16 +2235,16 @@
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
         switch (_annotationType) {
             case CAnnotationTypeLine:
-                color = [userDefaults PDFListViewColorForKey:CMeasureLineBorderColorKey] ? : NSColor.blueColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasureLineBorderColorKey] ? : NSColor.redColor;
                 break;
             case CAnnotationTypePolyLine:
-                color = [userDefaults PDFListViewColorForKey:CMeasureMultilineBorderColorKey] ? : NSColor.blueColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasureMultilineBorderColorKey] ? : NSColor.redColor;
                 break;
             case CAnnotationTypePolyGon:
-                color = [userDefaults PDFListViewColorForKey:CMeasurePolygonalBorderColorKey] ? : NSColor.blueColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasurePolygonalBorderColorKey] ? : NSColor.redColor;
                 break;
             case CAnnotationTypeSquare:
-                color = [userDefaults PDFListViewColorForKey:CMeasureRectanglesBorderColorKey] ? : NSColor.blueColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasureRectanglesBorderColorKey] ? : NSColor.redColor;
                 break;
             default:
                 break;
@@ -2296,16 +2296,16 @@
     NSColor  *color = nil;
     if (_annotation && self.annotations.count == 1) {
         if ([self.annotation isKindOfClass:[CPDFPolygonAnnotation class]]) {
-            color = [(CPDFPolygonAnnotation *)self.annotation interiorColor] ? : NSColor.clearColor;
+            color = [(CPDFPolygonAnnotation *)self.annotation interiorColor] ? : [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.0];
         }
     } else {
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
         switch (_annotationType) {
             case CAnnotationTypePolyGon:
-                color = [userDefaults PDFListViewColorForKey:CMeasurePolygonalLineColorKey] ? : NSColor.clearColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasurePolygonalLineColorKey] ? : [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.0];
                 break;
             case CAnnotationTypeSquare:
-                color = [userDefaults PDFListViewColorForKey:CMeasureRectanglesLineColorKey] ? : NSColor.clearColor;
+                color = [userDefaults PDFListViewColorForKey:CMeasureRectanglesLineColorKey] ? : [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.0];
                 break;
             default:
                 break;

BIN
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/ComPDFKit


+ 6 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m

@@ -797,6 +797,10 @@
 }
 
 - (void)setOpenPropertiesType:(KMOpenPropertiesType)openPropertiesType {
+    self.contentViewController = nil;
+    self.titleLabel.stringValue = @"";
+    self.titleViewHeightConstraint.constant = 0;
+
     _openPropertiesType = openPropertiesType;
     if (openPropertiesType == KMOpenPropertiesType_PageDisplay) {
         if (self.contentViewController) {
@@ -828,14 +832,14 @@
     } else if (openPropertiesType == KMOpenPropertiesType_FormSignatureClick) {
         self.contentViewController = nil;
         self.titleLabel.stringValue = @"";
+        self.titleViewHeightConstraint.constant = 0;
         
         CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc] initWithPDFAnnotations:_annotations];
         KMSignatureAnnotationViewController *vc = [[KMSignatureAnnotationViewController alloc] init];
         vc.isClickSignatureList = YES;
         vc.annotationModel = annotationModel;
         vc.pdfView = self.pdfView;
-        vc.view.frame = [self viewControllerRect];
-        [self.view addSubview:vc.view];
+        self.propertiesBox.contentView = vc.view;
         self.contentViewController = vc;
     }
 }

+ 4 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift

@@ -352,9 +352,12 @@ class KMRightSideViewController: NSViewController,CipherTextViewDelegate {
     
     
     @objc func signatureSelectedNotification(_ notification: Notification) {
+        if self.contextBox.contentView != self.annotationProperties.view {
+            self.contextBox.contentView = self.annotationProperties.view
+        }
         let editAnnotation: CPDFAnnotation = notification.object as! CPDFAnnotation
         if self.mainController?.model.rightPanelIsOpen == false {
-            self.mainController?.toggleRightPane() 
+            self.mainController?.openRightPane()
         }
         self.annotationProperties.mainController = self.mainController
         self.annotationProperties.isClickFormSignature = true;

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignatureAnnotationViewController.m

@@ -176,7 +176,7 @@ KMSigntureViewItemDelegate>
         
         CStampSignatureObject *sigObject = [[CStampSignatureObject alloc] initWithSignatureImage:selectedSig.pathsImage];
         self.clickSignature = selectedSig;
-        [self.pdfView setAddStampObject:sigObject keepToolModel:false];
+        [self.pdfView setAddStampObject:sigObject keepToolModel:true];
     }
     
     if (_signatures.count > 0) {

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -516,6 +516,7 @@ import Cocoa
         self.rightSideViewController.isHidden = true
         self.rightSideViewController.delegate = self
         self.rightView.addSubview(self.rightSideViewController.view)
+        self.rightSideViewController.mainController = self
         self.rightSideViewController.propertyDidChange = { [weak self] model in
             if let anno = model as? CSelfSignAnnotation {
                 self?.leftSideViewController.refreshUIForAnnoAttributeDidChange(anno, attributes: nil)