3 Commit-ok 0038653e41 ... ff422a5070

Szerző SHA1 Üzenet Dátum
  liaoxiaoyue ff422a5070 【工具栏】- 注释模块工具栏Tip多语补充 1 éve
  liaoxiaoyue 46260ccc8d 【属性面板】- 图章属性面板位置偏移处理。 1 éve
  liaoxiaoyue 76e744a05f 【BOTA】- 主菜单打开BOTA代码优化 1 éve

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

@@ -93,7 +93,15 @@ class KMLeftSideViewController: NSViewController, KMThumbnailViewControllerDeleg
         }
     }
     
-    func refreshMethodType(newType:KMLeftMethodMode,show:Bool) {
+    func refreshMethodType(methodType:BotaType) {
+        let newType = KMLeftMethodMode()
+        var show = true
+        if self.type.methodType != methodType {
+            newType.methodType = .Annotation
+        }
+        if self.type.methodType == methodType {
+            show = false
+        }
         self.type = newType;
         self.refreshShowMethod()
         self.delegate?.controlStateChange?(self,show:show)

+ 3 - 3
PDF Office/PDF Office/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.xib

@@ -215,7 +215,7 @@
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <subviews>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="FSa-kq-l83">
-                                <rect key="frame" x="16" y="502" width="213" height="80"/>
+                                <rect key="frame" x="16" y="462" width="213" height="80"/>
                                 <view key="contentView" id="bBG-qw-FI3">
                                     <rect key="frame" x="0.0" y="0.0" width="213" height="80"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -239,7 +239,7 @@
                                 <color key="fillColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </box>
                             <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="g0Y-OE-5sV">
-                                <rect key="frame" x="16" y="454" width="213" height="32"/>
+                                <rect key="frame" x="16" y="414" width="213" height="32"/>
                                 <view key="contentView" hidden="YES" id="qny-QN-Xbw">
                                     <rect key="frame" x="0.0" y="0.0" width="213" height="32"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -288,7 +288,7 @@
                         <constraints>
                             <constraint firstItem="FSa-kq-l83" firstAttribute="leading" secondItem="qKf-ge-VzH" secondAttribute="leading" constant="16" id="1lb-fF-LN1"/>
                             <constraint firstItem="g0Y-OE-5sV" firstAttribute="leading" secondItem="FSa-kq-l83" secondAttribute="leading" id="Ltu-oS-3bu"/>
-                            <constraint firstItem="FSa-kq-l83" firstAttribute="top" secondItem="qKf-ge-VzH" secondAttribute="top" id="ZZc-Db-hfC"/>
+                            <constraint firstItem="FSa-kq-l83" firstAttribute="top" secondItem="qKf-ge-VzH" secondAttribute="top" constant="40" id="ZZc-Db-hfC"/>
                             <constraint firstItem="g0Y-OE-5sV" firstAttribute="top" secondItem="FSa-kq-l83" secondAttribute="bottom" constant="16" id="bfD-dX-2mS"/>
                             <constraint firstAttribute="trailing" secondItem="FSa-kq-l83" secondAttribute="trailing" constant="16" id="mqn-P4-Osc"/>
                             <constraint firstItem="g0Y-OE-5sV" firstAttribute="trailing" secondItem="FSa-kq-l83" secondAttribute="trailing" id="qdc-b4-zY8"/>

+ 14 - 19
PDF Office/PDF Office/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift

@@ -451,8 +451,8 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.titleName = NSLocalizedString("Markup", comment: "")
                 item?.target = self
                 item?.isMainTool = true
+                item?.toolTip = NSLocalizedString("Add annotation with highlight, text and shape tool", comment: "")
                 item?.btnTag = KMToolbarViewType.Annatiton.rawValue
-                item?.toolTip = NSLocalizedString("Annotate PDF with highlight, text box and markup tools", comment: "")
                 item?.btnAction = #selector(leftControllButtonAction)
                 
                 let menuItem = NSMenuItem.init(title: item?.titleName, action: #selector(leftControllButtonAction), target: self)
@@ -656,7 +656,6 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolHighlight")
                 item?.target = self
                 item?.btnTag = CAnnotationType.highlight.rawValue
-                item?.toolTip = NSLocalizedString("highlight", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -668,7 +667,6 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolUnderline")
                 item?.target = self
                 item?.btnTag = CAnnotationType.underline.rawValue
-                item?.toolTip = NSLocalizedString("underline", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -680,7 +678,6 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolStrikeththrough")
                 item?.target = self
                 item?.btnTag = CAnnotationType.strikeOut.rawValue
-                item?.toolTip = NSLocalizedString("strikeOut", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -692,7 +689,7 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolPen")
                 item?.target = self
                 item?.btnTag = CAnnotationType.ink.rawValue
-                item?.toolTip = NSLocalizedString("ink", comment: "")
+                item?.toolTip = NSLocalizedString("Draw freely as you do with a pen", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -704,11 +701,11 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolFreeText")
                 item?.target = self
                 item?.btnTag = CAnnotationType.freeText.rawValue
-                item?.toolTip = NSLocalizedString("freeText", comment: "")
+                item?.toolTip = NSLocalizedString("Text (⌘N)", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "freeText", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "FreeText", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.freeText.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarAnchoredAnnotationItemIdentifier {
@@ -716,11 +713,10 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolAnchored")
                 item?.target = self
                 item?.btnTag = CAnnotationType.anchored.rawValue
-                item?.toolTip = NSLocalizedString("anchored", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "anchored", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Anchored", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.anchored.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarSquareAnnotationItemIdentifier {
@@ -728,11 +724,11 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolSquare_Default")
                 item?.target = self
                 item?.btnTag = CAnnotationType.square.rawValue
-                item?.toolTip = NSLocalizedString("square", comment: "")
+                item?.toolTip = NSLocalizedString("Hold shift to draw square/circle/straight arrow/line", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "square", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Square", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.square.rawValue
                 item?.menuFormRepresentation = menuItem
             }  else if identifier ==  KMToolbarLinkAnnotationItemIdentifier {
@@ -740,11 +736,10 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolLine")
                 item?.target = self
                 item?.btnTag = CAnnotationType.link.rawValue
-                item?.toolTip = NSLocalizedString("link", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "link", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Link", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.link.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarSignSignatureAnnotationItemIdentifier {
@@ -752,7 +747,7 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolSignSignature")
                 item?.target = self
                 item?.btnTag = CAnnotationType.signSignature.rawValue
-                item?.toolTip = NSLocalizedString("SignSignature", comment: "")
+                item?.toolTip = NSLocalizedString("Add a handwritten signature or create a signature via the trackpad", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
@@ -764,23 +759,23 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolStamp")
                 item?.target = self
                 item?.btnTag = CAnnotationType.stamp.rawValue
-                item?.toolTip = NSLocalizedString("stamp", comment: "")
+                item?.toolTip = NSLocalizedString("Add Stamp", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(changeAnnotationMode)
                 
-                let menuItem = NSMenuItem.init(title: "stamp", action: #selector(changeAnnotationMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Stamp", action: #selector(changeAnnotationMode), target: self)
                 menuItem?.tag = CAnnotationType.stamp.rawValue
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarShowToolbarItemIdentifier {
                 item?.image = NSImage(named: "KMImageNameMainToolShow")
                 item?.alternateImage = NSImage(named: "KMImageNameMainToolShow")
                 item?.target = self
-                item?.toolTip = NSLocalizedString("show", comment: "")
-                item?.titleName = NSLocalizedString("show", comment: "")
+                item?.toolTip = NSLocalizedString("Hide", comment: "")
+                item?.titleName = NSLocalizedString("Hide", comment: "")
                 item?.boxImagePosition = KMToolBoxImagePosition.only
                 item?.btnAction = #selector(showPDFLayoutMode)
                 
-                let menuItem = NSMenuItem.init(title: "show", action: #selector(showPDFLayoutMode), target: self)
+                let menuItem = NSMenuItem.init(title: "Hide", action: #selector(showPDFLayoutMode), target: self)
                 item?.menuFormRepresentation = menuItem
             } else if identifier == KMToolbarAddTextEditPDFItemIdentifier {
                 item?.image = NSImage(named: "KMImageNameMainToolFreeText")

+ 5 - 45
PDF Office/PDF Office/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -235,63 +235,23 @@ extension KMMainViewController {
     }
     
     @IBAction func menuItemAction_thumai(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Thumbnail {
-            thumai.methodType = .Thumbnail
-        }
-        if self.leftSideViewController.type.methodType == .Thumbnail {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Thumbnail)
     }
 
     @IBAction func menuItemAction_outline(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Outline {
-            thumai.methodType = .Outline
-        }
-        if self.leftSideViewController.type.methodType == .Outline {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Outline)
     }
 
     @IBAction func menuItemAction_bookmark(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .BookMark {
-            thumai.methodType = .BookMark
-        }
-        if self.leftSideViewController.type.methodType == .BookMark {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .BookMark)
     }
     
     @IBAction func menuItemAction_annotation(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Annotation {
-            thumai.methodType = .Annotation
-        }
-        if self.leftSideViewController.type.methodType == .Annotation {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Annotation)
     }
 
     @IBAction func menuItemAction_search(_ sender: Any) {
-        let thumai = KMLeftMethodMode()
-        var show = true
-        if self.leftSideViewController.type.methodType != .Search {
-            thumai.methodType = .Search
-        }
-        if self.leftSideViewController.type.methodType == .Search {
-            show = false
-        }
-        self.leftSideViewController.refreshMethodType(newType: thumai, show:show)
+        self.leftSideViewController.refreshMethodType(methodType: .Search)
     }
 
     @IBAction func menuItemAction_topic(_ sender: Any) {