소스 검색

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

tangchao 1 년 전
부모
커밋
2b2983e1d7

+ 25 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -1275,7 +1275,15 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
             CPDFPage *page = [self pageAndPoint:&point forEvent:theEvent nearest:YES];
             
             CGFloat scan = self.scaleFactor;
-            scan /= 1.25;
+            if (0.25 <= scan && scan <= 3.0) {
+                scan /= 1.25;
+            } else if (3.01 <= scan && scan <= 10.0) {
+                scan /= 1.40;
+            } else if (10.01 <= scan && scan <= 100.0) {
+                scan /= 2.0;
+            } else {
+                scan /= 1.25;
+            }
             [self setScaleFactor:scan];
             [self goToRect:CGRectMake(point.x, point.y, 2, 2) onPage:page animated:YES];
             break;
@@ -1362,6 +1370,22 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
     
     if (dragged && NSIsEmptyRect(selRect) == NO) {
         [self zoomToRect:rect onPage:page];
+    } else {
+        NSPoint point = CGPointZero;
+        CPDFPage *page = [self pageAndPoint:&point forEvent:theEvent nearest:YES];
+        
+        CGFloat scan = self.scaleFactor;
+        if (0.25 <= scan && scan <= 3.0) {
+            scan *= 1.25;
+        } else if (3.01 <= scan && scan <= 10.0) {
+            scan *= 1.40;
+        } else if (10.01 <= scan && scan <= 100.0) {
+            scan *= 2.0;
+        } else {
+            scan *= 1.25;
+        }
+        [self setScaleFactor:scan];
+        [self goToRect:CGRectMake(point.x, point.y, 2, 2) onPage:page animated:YES];
     }
 }
 

+ 3 - 7
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.m

@@ -893,6 +893,9 @@
             color = self.annotationModel.color;
         }
         
+        if (!color) {
+            color = [NSColor clearColor];
+        }
         self.fillColorPickerVC.color = color;
     }
     self.generalImageView.image = [self.annotationModel annotationImage];
@@ -1259,13 +1262,6 @@
     } else {
         color = self.annotationModel.color;
     }
-    CGFloat red,green,blue,alpha;
-    [[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];
-    
-    if (CAnnotationTypeCircle== _annotationType ||
-        CAnnotationTypeSquare == _annotationType) {
-        color = [NSColor colorWithRed:red green:green blue:blue alpha:self.annotationModel.opacity];
-    }
 
     self.borderColorPickerVC.color = color;
     self.generalImageView.image = [self.annotationModel annotationImage];