Pārlūkot izejas kodu

【编辑】点击Add Image,需要补充属性面板的空状态

lizhe 1 gadu atpakaļ
vecāks
revīzija
cd00d26c43

+ 16 - 0
PDF Office/PDF Master.xcodeproj/project.pbxproj

@@ -1271,6 +1271,9 @@
 		AD53B70629ACC65500D61E81 /* KMMailHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = AD53B70429ACC65500D61E81 /* KMMailHelper.m */; };
 		AD53B70729ACC65500D61E81 /* KMMailHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = AD53B70429ACC65500D61E81 /* KMMailHelper.m */; };
 		AD6218D42A7D29F40088475C /* KMComparativeGradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD6218D32A7D29F40088475C /* KMComparativeGradientView.swift */; };
+		AD62606E2A9D968A006C6413 /* KMEditPDFAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD62606D2A9D968A006C6413 /* KMEditPDFAssets.xcassets */; };
+		AD62606F2A9D968B006C6413 /* KMEditPDFAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD62606D2A9D968A006C6413 /* KMEditPDFAssets.xcassets */; };
+		AD6260702A9D968B006C6413 /* KMEditPDFAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD62606D2A9D968A006C6413 /* KMEditPDFAssets.xcassets */; };
 		AD68782129A5FADC005B5210 /* KMLightMemberCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD68782029A5FADC005B5210 /* KMLightMemberCache.swift */; };
 		AD68782229A5FADC005B5210 /* KMLightMemberCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD68782029A5FADC005B5210 /* KMLightMemberCache.swift */; };
 		AD68782329A5FADC005B5210 /* KMLightMemberCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD68782029A5FADC005B5210 /* KMLightMemberCache.swift */; };
@@ -4117,6 +4120,7 @@
 		AD53B70329ACC65500D61E81 /* KMMailHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMMailHelper.h; sourceTree = "<group>"; };
 		AD53B70429ACC65500D61E81 /* KMMailHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMMailHelper.m; sourceTree = "<group>"; };
 		AD6218D32A7D29F40088475C /* KMComparativeGradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMComparativeGradientView.swift; sourceTree = "<group>"; };
+		AD62606D2A9D968A006C6413 /* KMEditPDFAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = KMEditPDFAssets.xcassets; sourceTree = "<group>"; };
 		AD68782029A5FADC005B5210 /* KMLightMemberCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMLightMemberCache.swift; sourceTree = "<group>"; };
 		AD68783229A60FA7005B5210 /* KMLoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMLoginView.swift; sourceTree = "<group>"; };
 		AD68783729A60FC0005B5210 /* KMLoginView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMLoginView.xib; sourceTree = "<group>"; };
@@ -5339,6 +5343,7 @@
 		8996CFE4295BE15800D32783 /* EditPDF */ = {
 			isa = PBXGroup;
 			children = (
+				AD6260712A9D9695006C6413 /* Source */,
 				AD58C0FB2A1F2D3C00F911A0 /* Category */,
 				AD3C6DFA2A1C48600010B1A7 /* Manager */,
 				ADC31FA92A0E0C1E00ED44A2 /* View */,
@@ -6397,6 +6402,14 @@
 			path = Category;
 			sourceTree = "<group>";
 		};
+		AD6260712A9D9695006C6413 /* Source */ = {
+			isa = PBXGroup;
+			children = (
+				AD62606D2A9D968A006C6413 /* KMEditPDFAssets.xcassets */,
+			);
+			path = Source;
+			sourceTree = "<group>";
+		};
 		AD68781F29A5FADC005B5210 /* Cache */ = {
 			isa = PBXGroup;
 			children = (
@@ -9824,6 +9837,7 @@
 				ADC63E432A49817400854E02 /* KMSubscribeSuccessView.xib in Resources */,
 				ADEC7A84299397F8009A8256 /* SF-Pro-Text-Semibold.otf in Resources */,
 				AD1CA4342A0640FC0070541F /* KMAnnotationScreenHeadView.xib in Resources */,
+				AD62606E2A9D968A006C6413 /* KMEditPDFAssets.xcassets in Resources */,
 				ADB1FE8229752F3200ED072D /* KMBatchSecurityView.xib in Resources */,
 				ADEC7A81299397F8009A8256 /* SF-Pro-Text-Regular.otf in Resources */,
 				BB4EEF3029763EE7003A3537 /* KMRedactBaseWindowController.xib in Resources */,
@@ -10297,6 +10311,7 @@
 				899700FA28F4051B009AF911 /* KMAnnotationViewController.xib in Resources */,
 				9FDD0FBB295D5230000C4DAD /* KMToolbarController.xib in Resources */,
 				9F1FE4E829406E4700E952CA /* COPYING in Resources */,
+				AD62606F2A9D968B006C6413 /* KMEditPDFAssets.xcassets in Resources */,
 				9F3D818B29A0A9A70087B5AD /* KMDesignButton.xib in Resources */,
 				9F1F82E72934D5240092C4B4 /* KMHomeExtractActionViewController.xib in Resources */,
 				9F0CB49329683DEE00007028 /* KMPropertiesPanelLineSubVC.xib in Resources */,
@@ -10475,6 +10490,7 @@
 				BBC348192955920B008D2CD1 /* KMBackgroundPropertyController.xib in Resources */,
 				9F02019B2A1F352100C9B673 /* KMAITranslationConfirmWindowController.xib in Resources */,
 				BB98080229CA93D400BEEB81 /* WelcomeWindowController.xib in Resources */,
+				AD6260702A9D968B006C6413 /* KMEditPDFAssets.xcassets in Resources */,
 				89E4E76629656A88002DBA6F /* KMAnnotationStampViewController.xib in Resources */,
 				899700E428F3A9F2009AF911 /* KMHomeWindowController.xib in Resources */,
 				BB7507EE29861C37002DBDB1 /* PasswordWindowController.xib in Resources */,

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMThumbnailViewController.swift

@@ -711,7 +711,7 @@ class KMThumbnailViewController: KMBaseViewController {
                     self.delegate?.controller?(controller: self, itemClick: menu, itemKey: .paste, params: nil)
                 }
             } else {
-                var index = (self.thumbnailView.collectionView.selectionIndexes).last ?? -1
+                let index = (self.thumbnailView.collectionView.selectionIndexes).last ?? -1
                 debugPrint("不是同一个document")
                 let url = URL(fileURLWithPath: KMThumbnailManager.manager.tempCopyFilePath)
                 self.thumbnailView(thumbanView: self.thumbnailView, didDragAddFiles: [url], indexpath: NSIndexPath(forItem: index, inSection: 0) as IndexPath)

+ 24 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditImagePropertyViewController.swift

@@ -59,6 +59,13 @@ class KMEditImagePropertyViewController: NSViewController {
     @IBOutlet weak var alignmentView: KMEditPropertyAlignmentView!
     @IBOutlet weak var alignmentViewTopConstraint: NSLayoutConstraint!
     
+    //NO Image
+    
+    @IBOutlet weak var noImageView: NSImageView!
+    @IBOutlet weak var noTitleLabel: NSTextField!
+    @IBOutlet weak var noSubtitleLabel: NSTextField!
+    @IBOutlet weak var noBackgroundView: NSView!
+    
     var rotateLeftVC: KMDesignPropertySelector?
     var rotateRightVC: KMDesignPropertySelector?
     var flipHorizontalVC: KMDesignPropertySelector?
@@ -211,6 +218,17 @@ class KMEditImagePropertyViewController: NSViewController {
         exportVC?.button(type: .Sec, size: .m)
         exportVC?.stringValue = NSLocalizedString("Export", comment: "")
         exportVC?.updateUI()
+        
+        self.noTitleLabel.textColor = NSColor.km_init(hex: "#616469")
+        self.noTitleLabel.font = NSFont.SFProTextRegularFont(14)
+        
+        self.noImageView.image = NSImage(named: "No_addimage")
+        let string = self.noSubtitleLabel.stringValue
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.lineHeightMultiple = 1.32
+        paragraphStyle.alignment = .center
+        self.noSubtitleLabel.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(string, comment: ""), attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle, .foregroundColor : NSColor.km_init(hex: "#94989C"), NSAttributedString.Key.font: NSFont.SFProTextRegularFont(12.0)])
+        self.noBackgroundView.backgroundColor(NSColor.km_init(hex: "#F7F8FA"))
     }
     
     func updateLanguage() {
@@ -232,6 +250,8 @@ class KMEditImagePropertyViewController: NSViewController {
     func reloadData() {
         imagesAreas = []
         if self.editingAreas.count > 0 {
+            self.noBackgroundView.isHidden = true
+            
             let areas = self.editingAreas
             self.alignmentView.editingAreas = areas
             
@@ -301,8 +321,9 @@ class KMEditImagePropertyViewController: NSViewController {
             }
             self.updateLanguage()
         } else {
-            self.updateButtonState(hidden: true)
-            self.editImageView.image = NSImage()
+//            self.updateButtonState(hidden: true)
+//            self.editImageView.image = NSImage()
+            self.noBackgroundView.isHidden = false
         }
     }
     
@@ -340,6 +361,7 @@ class KMEditImagePropertyViewController: NSViewController {
             self.flipHorizontalVC?.button.isEnabled = false
             self.flipHorizontalVC?.view.alphaValue = 0.5
         }
+        self.reloadData()
     }
     
     func updateImageAreasOpacity(opacity: CGFloat, state: KMOperationState, needListView: Bool = true) {

+ 54 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditImagePropertyViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -24,6 +24,10 @@
                 <outlet property="headerBoxMaginWidthConstraint" destination="qGk-qT-mBb" id="2qA-NH-y7u"/>
                 <outlet property="imageBox" destination="5y4-Y4-XuO" id="29i-qF-x7l"/>
                 <outlet property="imageBoxHeight" destination="lWK-rG-QR4" id="Gqy-86-ey9"/>
+                <outlet property="noBackgroundView" destination="2cv-Bg-EQU" id="cnu-G8-tbS"/>
+                <outlet property="noImageView" destination="H4i-ha-vev" id="gD9-lE-GQS"/>
+                <outlet property="noSubtitleLabel" destination="xT8-m7-QlU" id="jpw-rp-mZf"/>
+                <outlet property="noTitleLabel" destination="cBS-ZD-gNe" id="CNC-wX-q31"/>
                 <outlet property="opacityBox" destination="9ig-7b-xDq" id="Nlc-yf-4BI"/>
                 <outlet property="opacityBoxBottomMaginConstraint" destination="agw-2V-YyY" id="rjO-EG-goy"/>
                 <outlet property="opacityBoxHeight" destination="pQN-DI-xiY" id="xvF-Br-Df7"/>
@@ -33,7 +37,7 @@
                 <outlet property="replaceBox" destination="dSf-T8-3R3" id="WIv-EB-D9V"/>
                 <outlet property="rotateLeftBox" destination="hsv-dq-f4W" id="FPi-g7-M8b"/>
                 <outlet property="rotateRightBox" destination="q4N-oj-5zS" id="Z4f-ct-ofL"/>
-                <outlet property="titleLabel" destination="x6y-yu-lpY" id="dfv-KF-e34"/>
+                <outlet property="titleLabel" destination="x6y-yu-lpY" id="Vpa-k7-N5v"/>
                 <outlet property="view" destination="rCh-Bx-sa8" id="Yfd-9x-Vhe"/>
             </connections>
         </customObject>
@@ -56,7 +60,7 @@
                                     <rect key="frame" x="0.0" y="0.0" width="240" height="56"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XPI-yz-g9u">
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XPI-yz-g9u">
                                             <rect key="frame" x="-2" y="40" width="49" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="opacity" id="LXH-cy-YvE">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -136,7 +140,7 @@
                                                 <constraint firstAttribute="height" constant="88" id="lWK-rG-QR4"/>
                                             </constraints>
                                         </box>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="x6y-yu-lpY">
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="x6y-yu-lpY">
                                             <rect key="frame" x="14" y="144" width="41" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Image" id="F3k-6q-vFG">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -314,11 +318,54 @@
                                     <constraint firstAttribute="height" constant="100" id="fcW-mh-2WD"/>
                                 </constraints>
                             </customView>
+                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="2cv-Bg-EQU">
+                                <rect key="frame" x="0.0" y="0.0" width="260" height="452"/>
+                                <subviews>
+                                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="H4i-ha-vev">
+                                        <rect key="frame" x="66" y="176" width="128" height="128"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="128" id="FLb-Ah-Fr8"/>
+                                            <constraint firstAttribute="height" constant="128" id="YnP-4V-emy"/>
+                                        </constraints>
+                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="VmL-3i-3hR"/>
+                                    </imageView>
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cBS-ZD-gNe">
+                                        <rect key="frame" x="93" y="152" width="74" height="16"/>
+                                        <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Add Image" id="BJo-l6-NBY">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                    </textField>
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xT8-m7-QlU">
+                                        <rect key="frame" x="44" y="112" width="172" height="40"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="168" id="Fhy-XT-ZBN"/>
+                                            <constraint firstAttribute="height" constant="40" id="yDh-34-pSM"/>
+                                        </constraints>
+                                        <textFieldCell key="cell" alignment="center" title="Select an area on the page to insert the image." id="xdg-6Z-zNm">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                    </textField>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstItem="xT8-m7-QlU" firstAttribute="centerX" secondItem="2cv-Bg-EQU" secondAttribute="centerX" id="5H8-mW-VWd"/>
+                                    <constraint firstItem="cBS-ZD-gNe" firstAttribute="top" secondItem="H4i-ha-vev" secondAttribute="bottom" constant="8" id="Ue4-ch-F5B"/>
+                                    <constraint firstItem="H4i-ha-vev" firstAttribute="top" secondItem="2cv-Bg-EQU" secondAttribute="top" constant="148" id="bZ7-ca-xYL"/>
+                                    <constraint firstItem="cBS-ZD-gNe" firstAttribute="centerX" secondItem="2cv-Bg-EQU" secondAttribute="centerX" id="l55-Ii-Ogm"/>
+                                    <constraint firstItem="xT8-m7-QlU" firstAttribute="top" secondItem="cBS-ZD-gNe" secondAttribute="bottom" id="oJf-qh-MQT"/>
+                                    <constraint firstItem="H4i-ha-vev" firstAttribute="centerX" secondItem="2cv-Bg-EQU" secondAttribute="centerX" id="whS-c7-dyX"/>
+                                </constraints>
+                            </customView>
                         </subviews>
                         <constraints>
+                            <constraint firstAttribute="bottom" secondItem="2cv-Bg-EQU" secondAttribute="bottom" id="4oe-1N-VuF"/>
                             <constraint firstAttribute="trailing" secondItem="3AP-7h-Nfc" secondAttribute="trailing" constant="16" id="DPV-qc-7Mx"/>
                             <constraint firstAttribute="trailing" secondItem="6yW-By-Sg9" secondAttribute="trailing" id="HzJ-TZ-atu"/>
                             <constraint firstItem="6yW-By-Sg9" firstAttribute="top" secondItem="wc3-Ma-X7s" secondAttribute="top" id="IFt-ky-q6h"/>
+                            <constraint firstItem="2cv-Bg-EQU" firstAttribute="leading" secondItem="wc3-Ma-X7s" secondAttribute="leading" id="TQi-cc-SCm"/>
                             <constraint firstItem="3AP-7h-Nfc" firstAttribute="top" secondItem="9za-vG-ihA" secondAttribute="bottom" constant="16" id="Vog-68-6WN"/>
                             <constraint firstItem="qjn-Az-nK1" firstAttribute="leading" secondItem="wc3-Ma-X7s" secondAttribute="leading" constant="10" id="WQh-6J-l34"/>
                             <constraint firstAttribute="trailing" secondItem="qjn-Az-nK1" secondAttribute="trailing" constant="10" id="Z7T-fd-4CF"/>
@@ -326,8 +373,10 @@
                             <constraint firstItem="3AP-7h-Nfc" firstAttribute="leading" secondItem="wc3-Ma-X7s" secondAttribute="leading" constant="16" id="bxW-A6-7ur"/>
                             <constraint firstAttribute="trailing" secondItem="9za-vG-ihA" secondAttribute="trailing" constant="16" id="guW-jF-VVi"/>
                             <constraint firstItem="6yW-By-Sg9" firstAttribute="leading" secondItem="wc3-Ma-X7s" secondAttribute="leading" id="hFm-HD-mvX"/>
+                            <constraint firstAttribute="trailing" secondItem="2cv-Bg-EQU" secondAttribute="trailing" id="iuO-oD-bAG"/>
                             <constraint firstItem="9za-vG-ihA" firstAttribute="leading" secondItem="wc3-Ma-X7s" secondAttribute="leading" constant="16" id="n7q-6r-Hka"/>
                             <constraint firstItem="qjn-Az-nK1" firstAttribute="top" secondItem="6yW-By-Sg9" secondAttribute="bottom" constant="16" id="pMH-jX-v3E"/>
+                            <constraint firstItem="2cv-Bg-EQU" firstAttribute="top" secondItem="wc3-Ma-X7s" secondAttribute="top" constant="48" id="ybe-LO-sGP"/>
                         </constraints>
                     </view>
                 </subviews>

+ 17 - 17
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditPDFTextPropertyViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22146" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22146"/>
         <capability name="System colors introduced in macOS 10.13" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -74,8 +74,8 @@
                                     <constraint firstAttribute="height" constant="88" id="QxJ-yS-QZJ"/>
                                 </constraints>
                             </box>
-                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TmC-Oc-Dxd">
-                                <rect key="frame" x="14" y="616" width="30" height="16"/>
+                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TmC-Oc-Dxd">
+                                <rect key="frame" x="14" y="616" width="31" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Text" id="tZm-OE-Wdr">
                                     <font key="font" usesAppearanceFont="YES"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -85,7 +85,7 @@
                             <customView translatesAutoresizingMaskIntoConstraints="NO" id="LHG-XG-Y6G">
                                 <rect key="frame" x="16" y="303" width="228" height="153"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2gN-hL-7Ez">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2gN-hL-7Ez">
                                         <rect key="frame" x="-2" y="125" width="30" height="20"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="20" id="Xp1-BT-pjJ"/>
@@ -98,14 +98,14 @@
                                     </textField>
                                     <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ae7-Z5-hap">
                                         <rect key="frame" x="212" y="127" width="16" height="16"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="16" id="DiF-Xr-bR1"/>
-                                            <constraint firstAttribute="height" constant="16" id="buS-De-0SL"/>
-                                        </constraints>
                                         <buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="KMImageNameBtnFontsetNor" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="ArP-Fo-MWG">
                                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                             <font key="font" metaFont="system"/>
                                         </buttonCell>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="16" id="DiF-Xr-bR1"/>
+                                            <constraint firstAttribute="height" constant="16" id="buS-De-0SL"/>
+                                        </constraints>
                                     </button>
                                     <box boxType="custom" cornerRadius="4" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="Dcy-0U-AoP">
                                         <rect key="frame" x="170" y="5" width="58" height="32"/>
@@ -115,28 +115,28 @@
                                             <subviews>
                                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Rrw-k0-Lul">
                                                     <rect key="frame" x="32" y="5" width="20" height="20"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="width" constant="20" id="PbZ-2N-epC"/>
-                                                        <constraint firstAttribute="height" constant="20" id="RRU-pT-bQL"/>
-                                                    </constraints>
                                                     <buttonCell key="cell" type="bevel" bezelStyle="rounded" image="buttonCell:TIB-ws-deg:image" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="TIB-ws-deg">
                                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                         <font key="font" metaFont="system"/>
                                                     </buttonCell>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="20" id="PbZ-2N-epC"/>
+                                                        <constraint firstAttribute="height" constant="20" id="RRU-pT-bQL"/>
+                                                    </constraints>
                                                     <connections>
                                                         <action selector="fontColorAction:" target="-2" id="ou8-ks-dpX"/>
                                                     </connections>
                                                 </button>
                                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KRu-kj-Nkf">
                                                     <rect key="frame" x="4" y="5" width="20" height="20"/>
-                                                    <constraints>
-                                                        <constraint firstAttribute="height" constant="20" id="8zk-Dk-Xu3"/>
-                                                        <constraint firstAttribute="width" constant="20" id="Xoc-NP-7or"/>
-                                                    </constraints>
                                                     <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="LZD-Xh-ewn">
                                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                         <font key="font" metaFont="system"/>
                                                     </buttonCell>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="20" id="8zk-Dk-Xu3"/>
+                                                        <constraint firstAttribute="width" constant="20" id="Xoc-NP-7or"/>
+                                                    </constraints>
                                                 </button>
                                             </subviews>
                                             <constraints>

+ 6 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Source/KMEditPDFAssets.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 12 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/Contents.json

@@ -0,0 +1,12 @@
+{
+  "images" : [
+    {
+      "filename" : "addimage.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 480 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/Source/KMEditPDFAssets.xcassets/No_addimage.imageset/addimage.pdf

@@ -0,0 +1,480 @@
+%PDF-1.7
+
+1 0 obj
+  << /ExtGState << /E1 << /ca 0.300000 >> >> >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 18.428711 6.427734 cm
+0.807843 0.815686 0.831373 scn
+88.342857 111.000000 m
+3.657143 111.000000 l
+3.294210 111.000000 3.000000 110.705788 3.000000 110.342857 c
+3.000000 3.657143 l
+3.000000 3.294212 3.294213 3.000000 3.657141 3.000000 c
+88.342857 3.000000 l
+88.705788 3.000000 89.000000 3.294212 89.000000 3.657143 c
+89.000000 110.342857 l
+89.000000 110.705788 88.705788 111.000000 88.342857 111.000000 c
+h
+3.657143 114.000000 m
+1.637359 114.000000 0.000000 112.362648 0.000000 110.342857 c
+0.000000 3.657143 l
+0.000000 1.637360 1.637357 0.000000 3.657141 0.000000 c
+88.342857 0.000000 l
+90.362640 0.000000 92.000000 1.637352 92.000000 3.657143 c
+92.000000 110.342857 l
+92.000000 112.362640 90.362640 114.000000 88.342857 114.000000 c
+3.657143 114.000000 l
+h
+26.371166 89.072266 m
+13.571167 89.072266 l
+13.571167 92.072266 l
+26.371166 92.072266 l
+26.371166 89.072266 l
+h
+30.028442 89.072266 m
+65.685585 89.072266 l
+65.685585 92.072266 l
+30.028442 92.072266 l
+30.028442 89.072266 l
+h
+13.571289 79.929199 m
+13.571167 79.929199 l
+13.571167 82.929199 l
+13.571289 82.929199 l
+49.228310 82.929199 l
+49.228432 82.929199 l
+49.228432 79.929199 l
+49.228310 79.929199 l
+13.571289 79.929199 l
+h
+f*
+n
+Q
+q
+/E1 gs
+1.000000 0.000000 -0.000000 1.000000 32.000000 35.000000 cm
+0.741176 0.874510 0.992157 scn
+0.000000 39.000000 m
+0.000000 39.552284 0.447715 40.000000 1.000000 40.000000 c
+63.000000 40.000000 l
+63.552284 40.000000 64.000000 39.552284 64.000000 39.000000 c
+64.000000 1.000000 l
+64.000000 0.447716 63.552284 0.000000 63.000000 0.000000 c
+1.000000 0.000000 l
+0.447715 0.000000 0.000000 0.447716 0.000000 1.000000 c
+0.000000 39.000000 l
+h
+f
+n
+Q
+q
+1.000000 0.000000 -0.000000 1.000000 32.000000 32.000000 cm
+0.741176 0.874510 0.992157 scn
+1.500000 7.166668 m
+1.500000 7.995094 0.828427 8.666668 0.000000 8.666668 c
+-0.828427 8.666668 -1.500000 7.995094 -1.500000 7.166668 c
+1.500000 7.166668 l
+h
+-1.500000 13.500000 m
+-1.500000 12.671574 -0.828427 12.000000 0.000000 12.000000 c
+0.828427 12.000000 1.500000 12.671574 1.500000 13.500000 c
+-1.500000 13.500000 l
+h
+1.500000 19.833334 m
+1.500000 20.661762 0.828427 21.333334 0.000000 21.333334 c
+-0.828427 21.333334 -1.500000 20.661762 -1.500000 19.833334 c
+1.500000 19.833334 l
+h
+-1.500000 26.166668 m
+-1.500000 25.338242 -0.828427 24.666668 0.000000 24.666668 c
+0.828427 24.666668 1.500000 25.338242 1.500000 26.166668 c
+-1.500000 26.166668 l
+h
+1.500000 32.500004 m
+1.500000 33.328430 0.828427 34.000004 0.000000 34.000004 c
+-0.828427 34.000004 -1.500000 33.328430 -1.500000 32.500004 c
+1.500000 32.500004 l
+h
+-1.500000 38.833336 m
+-1.500000 38.004910 -0.828427 37.333336 0.000000 37.333336 c
+0.828427 37.333336 1.500000 38.004910 1.500000 38.833336 c
+-1.500000 38.833336 l
+h
+4.100000 41.500000 m
+4.928427 41.500000 5.600000 42.171574 5.600000 43.000000 c
+5.600000 43.828426 4.928427 44.500000 4.100000 44.500000 c
+4.100000 41.500000 l
+h
+10.299999 44.500000 m
+9.471572 44.500000 8.799999 43.828426 8.799999 43.000000 c
+8.799999 42.171574 9.471572 41.500000 10.299999 41.500000 c
+10.299999 44.500000 l
+h
+16.500000 41.500000 m
+17.328426 41.500000 18.000000 42.171574 18.000000 43.000000 c
+18.000000 43.828426 17.328426 44.500000 16.500000 44.500000 c
+16.500000 41.500000 l
+h
+22.699999 44.500000 m
+21.871572 44.500000 21.199999 43.828426 21.199999 43.000000 c
+21.199999 42.171574 21.871572 41.500000 22.699999 41.500000 c
+22.699999 44.500000 l
+h
+28.899998 41.500000 m
+29.728424 41.500000 30.399998 42.171574 30.399998 43.000000 c
+30.399998 43.828426 29.728424 44.500000 28.899998 44.500000 c
+28.899998 41.500000 l
+h
+35.099998 44.500000 m
+34.271568 44.500000 33.599998 43.828426 33.599998 43.000000 c
+33.599998 42.171574 34.271568 41.500000 35.099998 41.500000 c
+35.099998 44.500000 l
+h
+41.299999 41.500000 m
+42.128426 41.500000 42.799999 42.171574 42.799999 43.000000 c
+42.799999 43.828426 42.128426 44.500000 41.299999 44.500000 c
+41.299999 41.500000 l
+h
+47.500000 44.500000 m
+46.671574 44.500000 46.000000 43.828426 46.000000 43.000000 c
+46.000000 42.171574 46.671574 41.500000 47.500000 41.500000 c
+47.500000 44.500000 l
+h
+53.700001 41.500000 m
+54.528427 41.500000 55.200001 42.171574 55.200001 43.000000 c
+55.200001 43.828426 54.528427 44.500000 53.700001 44.500000 c
+53.700001 41.500000 l
+h
+59.900002 44.500000 m
+59.071575 44.500000 58.400002 43.828426 58.400002 43.000000 c
+58.400002 42.171574 59.071575 41.500000 59.900002 41.500000 c
+59.900002 44.500000 l
+h
+62.500000 38.833332 m
+62.500000 38.004906 63.171574 37.333332 64.000000 37.333332 c
+64.828430 37.333332 65.500000 38.004906 65.500000 38.833332 c
+62.500000 38.833332 l
+h
+65.500000 32.500000 m
+65.500000 33.328426 64.828430 34.000000 64.000000 34.000000 c
+63.171574 34.000000 62.500000 33.328426 62.500000 32.500000 c
+65.500000 32.500000 l
+h
+62.500000 26.166666 m
+62.500000 25.338238 63.171574 24.666666 64.000000 24.666666 c
+64.828430 24.666666 65.500000 25.338238 65.500000 26.166666 c
+62.500000 26.166666 l
+h
+65.500000 19.833332 m
+65.500000 20.661758 64.828430 21.333332 64.000000 21.333332 c
+63.171574 21.333332 62.500000 20.661758 62.500000 19.833332 c
+65.500000 19.833332 l
+h
+62.500000 13.499996 m
+62.500000 12.671570 63.171574 11.999996 64.000000 11.999996 c
+64.828430 11.999996 65.500000 12.671570 65.500000 13.499996 c
+62.500000 13.499996 l
+h
+65.500000 7.166664 m
+65.500000 7.995090 64.828430 8.666664 64.000000 8.666664 c
+63.171574 8.666664 62.500000 7.995090 62.500000 7.166664 c
+65.500000 7.166664 l
+h
+59.900002 4.500000 m
+59.071571 4.500000 58.400002 3.828426 58.400002 3.000000 c
+58.400002 2.171574 59.071571 1.500000 59.900002 1.500000 c
+59.900002 4.500000 l
+h
+53.700001 1.500000 m
+54.528427 1.500000 55.200001 2.171574 55.200001 3.000000 c
+55.200001 3.828426 54.528427 4.500000 53.700001 4.500000 c
+53.700001 1.500000 l
+h
+47.500000 4.500000 m
+46.671574 4.500000 46.000000 3.828426 46.000000 3.000000 c
+46.000000 2.171574 46.671574 1.500000 47.500000 1.500000 c
+47.500000 4.500000 l
+h
+41.299999 1.500000 m
+42.128426 1.500000 42.799999 2.171574 42.799999 3.000000 c
+42.799999 3.828426 42.128426 4.500000 41.299999 4.500000 c
+41.299999 1.500000 l
+h
+35.100002 4.500000 m
+34.271576 4.500000 33.600002 3.828426 33.600002 3.000000 c
+33.600002 2.171574 34.271576 1.500000 35.100002 1.500000 c
+35.100002 4.500000 l
+h
+28.900003 1.500000 m
+29.728430 1.500000 30.400003 2.171574 30.400003 3.000000 c
+30.400003 3.828426 29.728430 4.500000 28.900003 4.500000 c
+28.900003 1.500000 l
+h
+22.700001 4.500000 m
+21.871574 4.500000 21.200001 3.828426 21.200001 3.000000 c
+21.200001 2.171574 21.871574 1.500000 22.700001 1.500000 c
+22.700001 4.500000 l
+h
+16.500000 1.500000 m
+17.328426 1.500000 18.000000 2.171574 18.000000 3.000000 c
+18.000000 3.828426 17.328426 4.500000 16.500000 4.500000 c
+16.500000 1.500000 l
+h
+10.299998 4.500000 m
+9.471571 4.500000 8.799998 3.828426 8.799998 3.000000 c
+8.799998 2.171574 9.471571 1.500000 10.299998 1.500000 c
+10.299998 4.500000 l
+h
+4.099997 1.500000 m
+4.928424 1.500000 5.599997 2.171574 5.599997 3.000000 c
+5.599997 3.828426 4.928424 4.500000 4.099997 4.500000 c
+4.099997 1.500000 l
+h
+1.000000 4.500000 m
+1.276142 4.500000 1.500000 4.276142 1.500000 4.000000 c
+-1.500000 4.000000 l
+-1.500000 2.619289 -0.380712 1.500000 1.000000 1.500000 c
+1.000000 4.500000 l
+h
+1.500000 4.000000 m
+1.500000 7.166668 l
+-1.500000 7.166668 l
+-1.500000 4.000000 l
+1.500000 4.000000 l
+h
+1.500000 13.500000 m
+1.500000 19.833334 l
+-1.500000 19.833334 l
+-1.500000 13.500000 l
+1.500000 13.500000 l
+h
+1.500000 26.166668 m
+1.500000 32.500004 l
+-1.500000 32.500004 l
+-1.500000 26.166668 l
+1.500000 26.166668 l
+h
+1.500000 38.833336 m
+1.500000 42.000000 l
+-1.500000 42.000000 l
+-1.500000 38.833336 l
+1.500000 38.833336 l
+h
+1.500000 42.000000 m
+1.500000 41.723858 1.276141 41.500000 1.000000 41.500000 c
+1.000000 44.500000 l
+-0.380710 44.500000 -1.500000 43.380714 -1.500000 42.000000 c
+1.500000 42.000000 l
+h
+1.000000 41.500000 m
+4.100000 41.500000 l
+4.100000 44.500000 l
+1.000000 44.500000 l
+1.000000 41.500000 l
+h
+10.299999 41.500000 m
+16.500000 41.500000 l
+16.500000 44.500000 l
+10.299999 44.500000 l
+10.299999 41.500000 l
+h
+22.699999 41.500000 m
+28.899998 41.500000 l
+28.899998 44.500000 l
+22.699999 44.500000 l
+22.699999 41.500000 l
+h
+35.099998 41.500000 m
+41.299999 41.500000 l
+41.299999 44.500000 l
+35.099998 44.500000 l
+35.099998 41.500000 l
+h
+47.500000 41.500000 m
+53.700001 41.500000 l
+53.700001 44.500000 l
+47.500000 44.500000 l
+47.500000 41.500000 l
+h
+59.900002 41.500000 m
+63.000000 41.500000 l
+63.000000 44.500000 l
+59.900002 44.500000 l
+59.900002 41.500000 l
+h
+63.000000 41.500000 m
+62.723858 41.500000 62.500000 41.723858 62.500000 42.000000 c
+65.500000 42.000000 l
+65.500000 43.380711 64.380714 44.500000 63.000000 44.500000 c
+63.000000 41.500000 l
+h
+62.500000 42.000000 m
+62.500000 38.833332 l
+65.500000 38.833332 l
+65.500000 42.000000 l
+62.500000 42.000000 l
+h
+62.500000 32.500000 m
+62.500000 26.166666 l
+65.500000 26.166666 l
+65.500000 32.500000 l
+62.500000 32.500000 l
+h
+62.500000 19.833332 m
+62.500000 13.499996 l
+65.500000 13.499996 l
+65.500000 19.833332 l
+62.500000 19.833332 l
+h
+62.500000 7.166664 m
+62.500000 4.000000 l
+65.500000 4.000000 l
+65.500000 7.166664 l
+62.500000 7.166664 l
+h
+62.500000 4.000000 m
+62.500000 4.276142 62.723858 4.500000 63.000000 4.500000 c
+63.000000 1.500000 l
+64.380707 1.500000 65.500000 2.619286 65.500000 4.000000 c
+62.500000 4.000000 l
+h
+63.000000 4.500000 m
+59.900002 4.500000 l
+59.900002 1.500000 l
+63.000000 1.500000 l
+63.000000 4.500000 l
+h
+53.700001 4.500000 m
+47.500000 4.500000 l
+47.500000 1.500000 l
+53.700001 1.500000 l
+53.700001 4.500000 l
+h
+41.299999 4.500000 m
+35.100002 4.500000 l
+35.100002 1.500000 l
+41.299999 1.500000 l
+41.299999 4.500000 l
+h
+28.900003 4.500000 m
+22.700001 4.500000 l
+22.700001 1.500000 l
+28.900003 1.500000 l
+28.900003 4.500000 l
+h
+16.500000 4.500000 m
+10.299998 4.500000 l
+10.299998 1.500000 l
+16.500000 1.500000 l
+16.500000 4.500000 l
+h
+4.099997 4.500000 m
+1.000000 4.500000 l
+1.000000 1.500000 l
+4.099997 1.500000 l
+4.099997 4.500000 l
+h
+f
+n
+Q
+q
+1.000000 0.000000 -0.000000 1.000000 83.000000 25.000000 cm
+0.741176 0.874510 0.992157 scn
+0.000000 24.000000 m
+0.000000 26.209139 1.790861 28.000000 4.000000 28.000000 c
+30.000000 28.000000 l
+32.209141 28.000000 34.000000 26.209139 34.000000 24.000000 c
+34.000000 4.000000 l
+34.000000 1.790861 32.209141 0.000000 30.000000 0.000000 c
+4.000000 0.000000 l
+1.790861 0.000000 0.000000 1.790861 0.000000 4.000000 c
+0.000000 24.000000 l
+h
+f
+n
+Q
+q
+1.000000 0.000000 -0.000000 1.000000 86.000000 29.911789 cm
+1.000000 1.000000 1.000000 scn
+6.333062 10.157764 m
+1.284332 1.333094 l
+0.712223 0.333105 1.434232 -0.911789 2.586311 -0.911789 c
+25.156179 -0.911789 l
+26.362423 -0.911789 27.075287 0.439715 26.394140 1.435237 c
+22.323973 7.383943 l
+21.865274 8.054350 20.956266 8.237804 20.273460 7.797775 c
+15.146871 4.493973 l
+14.496662 4.074949 13.634440 4.219081 13.155865 4.826796 c
+8.813496 10.340915 l
+8.155536 11.176420 6.861171 11.080847 6.333062 10.157764 c
+h
+f
+n
+Q
+q
+1.000000 0.000000 -0.000000 1.000000 106.000000 42.000000 cm
+1.000000 1.000000 1.000000 scn
+6.000000 3.000000 m
+6.000000 1.343146 4.656854 0.000000 3.000000 0.000000 c
+1.343146 0.000000 0.000000 1.343146 0.000000 3.000000 c
+0.000000 4.656854 1.343146 6.000000 3.000000 6.000000 c
+4.656854 6.000000 6.000000 4.656854 6.000000 3.000000 c
+h
+f
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  11321
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 128.000000 128.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000074 00000 n
+0000011451 00000 n
+0000011475 00000 n
+0000011650 00000 n
+0000011724 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+11783
+%%EOF

+ 5 - 2
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -191,12 +191,15 @@ extension KMMainViewController: KMToolbarControllerDelegate {
                 self.listView.setShouAddEdit(.text)
                 self.listView.change(.text)
             } else if self.listView.annotationType == .addImage {
-//                self.rightSideViewController.isHidden = false
-                self.closeRightPane()
+                self.rightSideViewController.isHidden = false
+                self.openRightPane()
+                
+//                self.closeRightPane()
                 
                 self.rightSideViewController.subViewType = .EditPDFAddImage
                 self.listView.setShouAddEdit(.image)
                 self.listView.change(.image)
+                self.rightSideViewController.eidtPDFImageProperty.reloadData()
             }
         } else {
 //            self.rightSideViewController.view.isHidden = true

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

@@ -1519,9 +1519,9 @@ import Cocoa
                     if self.listView.isEditImage {
                         self.menuItemEditingClick_CropImage(sender: NSMenuItem())
                     } else {
-                        if self.listView.annotationType == .addImage {
-                            self.closeRightPane()
-                        }
+//                        if self.listView.annotationType == .addImage {
+//                            self.closeRightPane()
+//                        }
 //                        if self.rightSideViewController.eidtPDFImageProperty != nil {
 //                            self.rightSideViewController.eidtPDFImageProperty.reloadData()
 //                        }