3 Revize 1196e7cf01 ... 78bada7310

Autor SHA1 Zpráva Datum
  liaoxiaoyue 78bada7310 【右边栏】- 属性面板,多选不显示预览图 před 1 rokem
  liaoxiaoyue 480f0dae26 【左边栏】- 旋转缩略图后,选中状态保持不变 před 1 rokem
  liaoxiaoyue 499e274b66 【页面编辑】- 删除右键菜单分享 před 1 rokem

+ 6 - 6
PDF Office/PDF Office/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.swift

@@ -1327,12 +1327,12 @@ extension KMPDFEditViewController : NSMenuDelegate,NSMenuItemValidation {
         item = menu.addItem(withTitle: NSLocalizedString("Print", comment: ""), action: #selector(printItemAction), target: self)
         item.representedObject = row
         
-        if (row.count <= 1) {
-            item = menu.addItem(withTitle: NSLocalizedString("Share", comment: ""), action: nil, target: self)
-            item.representedObject = row
-            
-            item.submenu = NSSharingServicePicker.menu(forSharingItems: [self.listView!.document.documentURL ?? ""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
-        }
+//        if (row.count <= 1) {
+//            item = menu.addItem(withTitle: NSLocalizedString("Share", comment: ""), action: nil, target: self)
+//            item.representedObject = row
+//            
+//            item.submenu = NSSharingServicePicker.menu(forSharingItems: [self.listView!.document.documentURL ?? ""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
+//        }
     }
 }
 

+ 1 - 0
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -129,6 +129,7 @@ class KMLeftSideViewController: NSViewController, KMThumbnailViewControllerDeleg
         case .BookMark: do {
             self.bookViewController.listView = self.listView
             self.contentBox.contentView = self.bookViewController.view
+            self.bookViewController.reloadData()
         }
             break
         case .Annotation: do {

+ 4 - 0
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMThumbnailViewController.swift

@@ -396,6 +396,7 @@ class KMThumbnailViewController: NSViewController {
     
     @IBAction func rotatePageItemAction(menu:NSMenuItem) {
         let indexs = self.thumbnailView.collectionView.selectionIndexes
+        let indexPaths = self.thumbnailView.collectionView.selectionIndexPaths
         if indexs.count >= 0 {
             let newDocument = self.thumbnailView.document
             for index in indexs {
@@ -412,11 +413,13 @@ class KMThumbnailViewController: NSViewController {
             }
             self.listView.layoutDocumentView()
             self.thumbnailView.reloadData()
+            self.thumbnailView.collectionView.selectItems(at: indexPaths, scrollPosition: .top)
         }
     }
     
     @IBAction func leftRotatePageItemAction(menu:NSMenuItem) {
         let indexs = self.thumbnailView.collectionView.selectionIndexes
+        let indexPaths = self.thumbnailView.collectionView.selectionIndexPaths
         if indexs.count >= 0 {
             let newDocument = self.thumbnailView.document
             for index in indexs {
@@ -433,6 +436,7 @@ class KMThumbnailViewController: NSViewController {
             }
             self.listView.layoutDocumentView()
             self.thumbnailView.reloadData()
+            self.thumbnailView.collectionView.selectItems(at: indexPaths, scrollPosition: .top)
         }
     }
     

+ 22 - 2
PDF Office/PDF Office/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.m

@@ -400,7 +400,12 @@
 #pragma mark - private
 
 - (void)hiddenSubviews {
-    self.generaImageTopLayoutConstraint.constant = self.inkView.hidden ?  -(self.inkView.bounds.size.height) : 16.0f;
+    if(self.generalImageBoxView.hidden) {
+        self.generaImageTopLayoutConstraint.constant = -(self.generalImageBoxView.bounds.size.height) - (self.inkView.bounds.size.height);
+    } else {
+        self.generaImageTopLayoutConstraint.constant = self.inkView.hidden ?  -(self.inkView.bounds.size.height) : 16.0f;
+    }
+    
     self.fontDefaultTopConstraint.constant = self.defaultFontView.hidden ? -(self.defaultFontView.bounds.size.height) : 16.0f;
     self.figureTopConstraint.constant = self.figureView.hidden ? -(self.figureView.bounds.size.height) : 8.0f;
     self.fontViewTopConstraint.constant = self.fontView.hidden ? -(self.fontView.bounds.size.height) : 8.0f;
@@ -434,6 +439,13 @@
     } else {
         self.inkView.hidden = YES;
     }
+    
+    if (self.annotationModel.annotations.count > 1) {
+        self.generalImageBoxView.hidden = YES;
+    } else {
+        self.generalImageBoxView.hidden = NO;
+    }
+    
     self.noteStyleView.hidden = YES;
     self.borderOpacityView.hidden = YES;
 
@@ -686,7 +698,9 @@
 - (void)updateOpacityView
 {
     CGFloat opacity = self.annotationModel.opacity;
-    
+    if(self.annotationModel.annotations.count > 1) {
+        opacity = self.annotationModel.annotation.opacity;
+    }
     if (CAnnotationTypeCircle == _annotationType ||
         CAnnotationTypeSquare == _annotationType) {
         opacity = self.annotationModel.interiorOpacity;
@@ -772,6 +786,9 @@
 
 - (void)updateFillColorPickerVC
 {
+    if (self.annotationModel.annotations.count > 1) {
+        return;
+    }
     NSColor *color = nil;
     if (CAnnotationTypeCircle == _annotationType ||
         CAnnotationTypeSquare == _annotationType) {
@@ -859,6 +876,9 @@
 
 - (void)updateBorderColorPickerVC
 {
+    if (self.annotationModel.annotations.count > 1) {
+        return;
+    }
     NSColor *color = self.annotationModel.color;
     CGFloat red,green,blue,alpha;
     [[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];