ソースを参照

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

tangchao 1 年間 前
コミット
c0c88982b5

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

@@ -1758,6 +1758,9 @@
 		ADE8BC2F29F8CD7200570F89 /* KMPDFThumbnailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE8BC2E29F8CD7200570F89 /* KMPDFThumbnailModel.swift */; };
 		ADE8BC3029F8CD7200570F89 /* KMPDFThumbnailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE8BC2E29F8CD7200570F89 /* KMPDFThumbnailModel.swift */; };
 		ADE8BC3129F8CD7200570F89 /* KMPDFThumbnailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE8BC2E29F8CD7200570F89 /* KMPDFThumbnailModel.swift */; };
+		ADE8BC3329F9261900570F89 /* KMSearchCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE8BC3229F9261900570F89 /* KMSearchCellView.xib */; };
+		ADE8BC3429F9261900570F89 /* KMSearchCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE8BC3229F9261900570F89 /* KMSearchCellView.xib */; };
+		ADE8BC3529F9261900570F89 /* KMSearchCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADE8BC3229F9261900570F89 /* KMSearchCellView.xib */; };
 		ADEC7A7E299397F8009A8256 /* NSFont+SFProText.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */; };
 		ADEC7A7F299397F8009A8256 /* NSFont+SFProText.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */; };
 		ADEC7A80299397F8009A8256 /* NSFont+SFProText.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */; };
@@ -3911,6 +3914,7 @@
 		ADE8BC2429F7CCA600570F89 /* KMPageNumberDisplayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageNumberDisplayView.swift; sourceTree = "<group>"; };
 		ADE8BC2929F7CDB000570F89 /* KMPageNumberDisplayView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPageNumberDisplayView.xib; sourceTree = "<group>"; };
 		ADE8BC2E29F8CD7200570F89 /* KMPDFThumbnailModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMPDFThumbnailModel.swift; sourceTree = "<group>"; };
+		ADE8BC3229F9261900570F89 /* KMSearchCellView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMSearchCellView.xib; sourceTree = "<group>"; };
 		ADEC7A7B299397F8009A8256 /* NSFont+SFProText.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSFont+SFProText.swift"; sourceTree = "<group>"; };
 		ADEC7A7C299397F8009A8256 /* SF-Pro-Text-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Text-Regular.otf"; sourceTree = "<group>"; };
 		ADEC7A7D299397F8009A8256 /* SF-Pro-Text-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Text-Semibold.otf"; sourceTree = "<group>"; };
@@ -6649,6 +6653,7 @@
 			isa = PBXGroup;
 			children = (
 				89752E182941FD48003FF08E /* KMSearchCellView.swift */,
+				ADE8BC3229F9261900570F89 /* KMSearchCellView.xib */,
 				ADE3C19E29A3894900793B13 /* KMSearchTableRowView.swift */,
 			);
 			path = View;
@@ -9100,6 +9105,7 @@
 				BB5DF1F42959C9F00025CDA1 /* KMHeaderFooterPropertyMainController.xib in Resources */,
 				ADD1B6DB2946BE1700C3FFF7 /* KMPrintChoosePageSizeView.xib in Resources */,
 				9F0CB4AA296CF19600007028 /* KMPropertiesPanelListMenuSubVC.xib in Resources */,
+				ADE8BC3329F9261900570F89 /* KMSearchCellView.xib in Resources */,
 				BBC348362955A118008D2CD1 /* KMCreateBackgroundController.xib in Resources */,
 				9F0CB4C02977C06300007028 /* KMPropertiesPanelColorSubVC.xib in Resources */,
 				ADD1B6F42946C07800C3FFF7 /* KMPrintChoosePageSizePosterView.xib in Resources */,
@@ -9290,6 +9296,7 @@
 				89D2D2FF294C806000BFF5FE /* KMPDFThumbnailItem.xib in Resources */,
 				89E4E70C2963D62B002DBA6F /* KMAnnotationFontWindowController.xib in Resources */,
 				ADC25DFD2923BA710080A3F6 /* KMImageToPDFWindowController.xib in Resources */,
+				ADE8BC3429F9261900570F89 /* KMSearchCellView.xib in Resources */,
 				8931684D296E436B0073EA59 /* KMSignatureWindowController.xib in Resources */,
 				9F8539DB294318D600DF644E /* TabsImage.xcassets in Resources */,
 				BB52372B29C313CA00663BD7 /* KMAnnotationPropertyBaseController.xib in Resources */,
@@ -9530,6 +9537,7 @@
 				ADCB98FF292750A200B51A03 /* KMBatchProcessingTableView.xib in Resources */,
 				ADD1B6FE2946C0D400C3FFF7 /* KMPrintChoosePageSizePamphletView.xib in Resources */,
 				9FF94F1629A7476000B1EF69 /* KMDesignPropertySelector.xib in Resources */,
+				ADE8BC3529F9261900570F89 /* KMSearchCellView.xib in Resources */,
 				ADC075DF29876622006C752F /* KMBatchConverPDFPPTView.xib in Resources */,
 				AD0FA51829A9FA8F00EDEB50 /* KMResetPasswordView.xib in Resources */,
 				ADE3C1E929A5ABC200793B13 /* KMLoginWindowController.xib in Resources */,

+ 4 - 0
PDF Office/PDF Master/AppDelegate.swift

@@ -11,6 +11,10 @@ import KMAdvertisement
 @main
 class AppDelegate: NSObject, NSApplicationDelegate {
     
+    func applicationWillBecomeActive(_ notification: Notification) {
+        NotificationCenter.default.post(name: NSNotification.Name(rawValue: "KMApplicationWillBecomeActive"), object: nil)
+    }
+    
     func applicationDidBecomeActive(_ notification: Notification) {
         
     }

+ 0 - 11
PDF Office/PDF Master/Base.lproj/Main.storyboard

@@ -627,17 +627,6 @@ CA
                                                 <action selector="menuItemAction_lastPage:" target="Ady-hI-5gd" id="8Go-eY-Fxz"/>
                                             </connections>
                                         </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="EGZ-y2-Uv8"/>
-                                        <menuItem title="Forward" keyEquivalent="[" id="rlK-2p-u0K">
-                                            <connections>
-                                                <action selector="menuItemAction_forward:" target="Ady-hI-5gd" id="sXH-n9-PMu"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Back" keyEquivalent="]" id="Xf9-c5-DtF">
-                                            <connections>
-                                                <action selector="menuItemAction_goback:" target="Ady-hI-5gd" id="Zdv-36-C63"/>
-                                            </connections>
-                                        </menuItem>
                                         <menuItem isSeparatorItem="YES" id="GBa-zm-tXk"/>
                                         <menuItem title="Go To Page…" keyEquivalent="g" id="D2G-tQ-ifn">
                                             <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>

+ 6 - 0
PDF Office/PDF Master/Class/Home/ViewController/KMHomeHistoryFileViewController.swift

@@ -299,6 +299,8 @@ class KMHomeHistoryFileViewController: NSViewController, NSCollectionViewDelegat
         allowMultipleChoices_cmd = false
         allowMultipleChoices_shift = false
 
+        NotificationCenter.default.addObserver(self, selector: #selector(willBecomeActive), name: NSNotification.Name(rawValue: "KMApplicationWillBecomeActive"), object: nil)
+        
         if UserDefaults.standard.bool(forKey: "kFileListViewListModeKey") {
             showMode = .List
         } else {
@@ -526,6 +528,10 @@ class KMHomeHistoryFileViewController: NSViewController, NSCollectionViewDelegat
             }
         }
     }
+    
+    @objc func willBecomeActive() {
+        self.reloadData()
+    }
 
     // MARK: Action
     

+ 1 - 2
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -119,12 +119,11 @@ import KMAdvertisement
         self.leftBox.fillColor = NSColor(hex: "#F7F8FA")
         
         self.productPromotionPDFProSeries = ["Windows", "iPhone / iPad", "Android"]
-        self.productPromotionOthers = ["ComPDFKit", "ComVideoKit", "SignFlow", "FiImage Editor", "FiImage Screen", "Free PDF Templates"]
+        self.productPromotionOthers = ["ComPDFKit", "SignFlow", "FiImage Editor", "FiImage Screen", "Free PDF Templates"]
         self.productPromotionData = ["Windows": ["Name" : "Windows", "Image" : "icon_home_logo_windows", "link":""],
                                      "iPhone / iPad" : ["Name" : "iPhone / iPad", "Image" : "icon_home_logo_mac", "link":""],
                                      "Android" : ["Name" : "Android", "Image" : "icon_home_logo_android", "link":""],
                                      "ComPDFKit" : ["Name" : "ComPDFKit", "Image" : "icon_home_logo_comPDFKit", "link":""],
-                                     "ComVideoKit" : ["Name" : "ComVideoKit", "Image" : "icon_home_logo_comVideoKit", "link":""],
                                      "SignFlow" : ["Name" : "SignFlow", "Image" : "icon_home_logo_signflow", "link":""],
                                      "FiImage Editor" : ["Name" : "FiImage Editor", "Image" : "icon_home_logo_editor", "link":""],
                                      "FiImage Screen" : ["Name" : "FiImage Screen", "Image" : "icon_home_logo_screen", "link":""],

+ 1 - 1
PDF Office/PDF Master/Class/PDFTools/ImageToPDF/View/KMImageToPDFChooseView/KMImageToPDFChooseView.swift

@@ -141,7 +141,7 @@ class KMImageToPDFChooseView: KMBaseXibView {
         
         self.selectLanguageLabel.stringValue = NSLocalizedString("English", comment: "")
         
-        self.newPDFButton.title = NSLocalizedString("Creat PDF", comment: "")
+        self.newPDFButton.title = NSLocalizedString("Create PDF for each image", comment: "")
         
         self.mergePDFButton.title = NSLocalizedString("Merge as one PDF document", comment: "")
         

+ 8 - 9
PDF Office/PDF Master/Class/PDFTools/ImageToPDF/View/KMImageToPDFChooseView/KMImageToPDFChooseView.xib

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMImageToPDFChooseView" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMImageToPDFChooseView" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="OCRTilteLable" destination="jrX-yB-GG4" id="Z0s-Wl-lhV"/>
                 <outlet property="exportPDFButton" destination="UVe-Ld-JJI" id="aCB-kp-bLh"/>
@@ -47,7 +46,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="YyB-Ut-BRv">
                             <rect key="frame" x="0.0" y="98" width="260" height="22"/>
                             <subviews>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="6OL-fG-Gjx" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="6OL-fG-Gjx" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="0.0" width="228" height="22"/>
                                 </customView>
                             </subviews>
@@ -62,7 +61,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="zrO-hg-jel">
                             <rect key="frame" x="0.0" y="68" width="260" height="22"/>
                             <subviews>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="p19-DS-5aU" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="p19-DS-5aU" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="0.0" width="228" height="22"/>
                                 </customView>
                             </subviews>
@@ -77,7 +76,7 @@
                         <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="z2a-zX-F3Z">
                             <rect key="frame" x="0.0" y="38" width="260" height="22"/>
                             <subviews>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="UJo-wM-Q8G" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="UJo-wM-Q8G" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="0.0" width="228" height="22"/>
                                 </customView>
                             </subviews>
@@ -205,7 +204,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="4rj-nG-Rc1">
                             <rect key="frame" x="0.0" y="70" width="260" height="22"/>
                             <subviews>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="24O-b0-fHf" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="24O-b0-fHf" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="0.0" width="228" height="22"/>
                                 </customView>
                             </subviews>
@@ -265,7 +264,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="SEa-Rp-Ebr">
                             <rect key="frame" x="0.0" y="0.0" width="260" height="22"/>
                             <subviews>
-                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="H77-qf-Mx7" customClass="KMImageTitleButton" customModule="PDF_Office" customModuleProvider="target">
+                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="H77-qf-Mx7" customClass="KMImageTitleButton" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="16" y="0.0" width="228" height="22"/>
                                 </customView>
                             </subviews>

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Search/KMSearchViewController.swift

@@ -438,7 +438,7 @@ extension KMSearchViewController : NSOutlineViewDataSource,NSOutlineViewDelegate
     }
     
     func outlineView(_ outlineView: NSOutlineView, viewFor tableColumn: NSTableColumn?, item:Any) -> NSView? {
-        let cell : KMSearchCellView = outlineView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMSearchCellView"), owner: self) as! KMSearchCellView
+        let cell : KMSearchCellView = KMSearchCellView.init()
         let model : KMSearchMode = item as! KMSearchMode
         cell.model = model
         return cell

+ 6 - 68
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Search/KMSearchViewController.xib

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMSearchViewController" customModule="PDF_Office" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMSearchViewController" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="allTipTextField" destination="biW-Ca-hUF" id="YGs-EO-6Jc"/>
                 <outlet property="doneButton" destination="FEc-5K-ivt" id="788-ak-I5p"/>
@@ -34,12 +33,12 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="Duo-Bj-CPD">
                             <rect key="frame" x="16" y="14" width="190" height="32"/>
                             <subviews>
-                                <searchField wantsLayer="YES" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CoV-2h-BcO" customClass="FocusAwareSearchTextField" customModule="PDF_Office" customModuleProvider="target">
+                                <searchField wantsLayer="YES" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CoV-2h-BcO" customClass="FocusAwareSearchTextField" customModule="PDF_Master" customModuleProvider="target">
                                     <rect key="frame" x="8" y="5" width="174" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="YYd-Vh-XR1"/>
                                     </constraints>
-                                    <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="border" usesSingleLineMode="YES" id="5vn-o5-eWM" customClass="CSearchFieldCustomCell" customModule="PDF_Office" customModuleProvider="target">
+                                    <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="border" usesSingleLineMode="YES" id="5vn-o5-eWM" customClass="CSearchFieldCustomCell" customModule="PDF_Master" customModuleProvider="target">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                         <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
@@ -134,7 +133,7 @@ Gw
                                 <rect key="frame" x="0.0" y="0.0" width="222" height="513"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" multipleSelection="NO" autosaveColumns="NO" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" outlineTableColumn="8in-Rn-CUw" id="E7F-4C-rSA" customClass="KMOutlineView" customModule="PDF_Office" customModuleProvider="target">
+                                    <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" multipleSelection="NO" autosaveColumns="NO" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" outlineTableColumn="8in-Rn-CUw" id="E7F-4C-rSA" customClass="KMOutlineView" customModule="PDF_Master" customModuleProvider="target">
                                         <rect key="frame" x="0.0" y="0.0" width="222" height="513"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <size key="intercellSpacing" width="17" height="0.0"/>
@@ -152,67 +151,6 @@ Gw
                                                     <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                 </textFieldCell>
                                                 <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                                <prototypeCellViews>
-                                                    <tableCellView identifier="KMSearchCellView" id="CcH-qE-pLv" customClass="KMSearchCellView" customModule="PDF_Office" customModuleProvider="target">
-                                                        <rect key="frame" x="8" y="0.0" width="205" height="24"/>
-                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                        <subviews>
-                                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="qcP-cz-DQk">
-                                                                <rect key="frame" x="0.0" y="4" width="205" height="16"/>
-                                                                <subviews>
-                                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vt3-0l-A8l">
-                                                                        <rect key="frame" x="6" y="0.0" width="193" height="16"/>
-                                                                        <textFieldCell key="cell" enabled="NO" alignment="left" id="EbJ-b3-R44">
-                                                                            <font key="font" metaFont="system"/>
-                                                                            <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                                            <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                                                                        </textFieldCell>
-                                                                    </textField>
-                                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="myi-Xb-3Ae">
-                                                                        <rect key="frame" x="150" y="1" width="37" height="15"/>
-                                                                        <constraints>
-                                                                            <constraint firstAttribute="height" constant="15" id="AEa-xV-RNt"/>
-                                                                            <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="exr-Q6-AiM"/>
-                                                                        </constraints>
-                                                                        <textFieldCell key="cell" lineBreakMode="clipping" enabled="NO" alignment="right" title="Label" id="Uo7-cR-Yt1">
-                                                                            <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>
-                                                                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9tq-A1-8bD">
-                                                                        <rect key="frame" x="193" y="2" width="12" height="12"/>
-                                                                        <constraints>
-                                                                            <constraint firstAttribute="width" constant="12" id="NRC-31-a9L"/>
-                                                                            <constraint firstAttribute="height" constant="12" id="WVr-qx-hsj"/>
-                                                                        </constraints>
-                                                                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="DVT-Ud-42C"/>
-                                                                    </imageView>
-                                                                </subviews>
-                                                                <constraints>
-                                                                    <constraint firstItem="myi-Xb-3Ae" firstAttribute="centerY" secondItem="qcP-cz-DQk" secondAttribute="centerY" id="2lO-dK-FIl"/>
-                                                                    <constraint firstAttribute="trailing" secondItem="Vt3-0l-A8l" secondAttribute="trailing" constant="8" id="4PL-7P-cFG"/>
-                                                                    <constraint firstAttribute="trailing" secondItem="9tq-A1-8bD" secondAttribute="trailing" id="9DO-CM-vEr"/>
-                                                                    <constraint firstItem="9tq-A1-8bD" firstAttribute="centerY" secondItem="qcP-cz-DQk" secondAttribute="centerY" id="R3Y-7f-9QG"/>
-                                                                    <constraint firstItem="9tq-A1-8bD" firstAttribute="leading" secondItem="myi-Xb-3Ae" secondAttribute="trailing" constant="8" id="hVu-ca-f1f"/>
-                                                                    <constraint firstItem="Vt3-0l-A8l" firstAttribute="centerY" secondItem="qcP-cz-DQk" secondAttribute="centerY" id="ig8-XP-6YM"/>
-                                                                    <constraint firstItem="Vt3-0l-A8l" firstAttribute="leading" secondItem="qcP-cz-DQk" secondAttribute="leading" constant="8" id="j1t-Xl-hV8"/>
-                                                                </constraints>
-                                                            </customView>
-                                                        </subviews>
-                                                        <constraints>
-                                                            <constraint firstItem="qcP-cz-DQk" firstAttribute="leading" secondItem="CcH-qE-pLv" secondAttribute="leading" id="NX5-Me-KTF"/>
-                                                            <constraint firstAttribute="trailing" secondItem="qcP-cz-DQk" secondAttribute="trailing" id="fPF-vU-7rk"/>
-                                                            <constraint firstItem="qcP-cz-DQk" firstAttribute="top" secondItem="CcH-qE-pLv" secondAttribute="top" constant="4" id="gsC-JW-I0i"/>
-                                                            <constraint firstAttribute="bottom" secondItem="qcP-cz-DQk" secondAttribute="bottom" constant="4" id="q0L-bo-uQZ"/>
-                                                        </constraints>
-                                                        <connections>
-                                                            <outlet property="contextTextField" destination="Vt3-0l-A8l" id="mXb-v7-ghr"/>
-                                                            <outlet property="iconImageView" destination="9tq-A1-8bD" id="THS-aU-Dhr"/>
-                                                            <outlet property="pageIndexTextField" destination="myi-Xb-3Ae" id="M8e-LF-i3w"/>
-                                                        </connections>
-                                                    </tableCellView>
-                                                </prototypeCellViews>
                                             </tableColumn>
                                         </tableColumns>
                                         <connections>

+ 31 - 7
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Search/View/KMSearchCellView.swift

@@ -8,7 +8,7 @@
 import Cocoa
 
 class KMSearchCellView: NSTableCellView {
-    
+    @IBOutlet var contentView: NSView!
     @IBOutlet weak var contextTextField: NSTextField!
     @IBOutlet weak var pageIndexTextField: NSTextField!
     @IBOutlet weak var iconImageView: NSImageView!
@@ -20,7 +20,36 @@ class KMSearchCellView: NSTableCellView {
         }
     }
     
-    override func awakeFromNib() {
+    // MARK: 初始化
+    override init(frame frameRect: NSRect) {
+        super.init(frame: frameRect)
+        initContentView()
+        setup()
+    }
+    
+    required init?(coder decoder: NSCoder) {
+        super.init(coder: decoder)
+        initContentView()
+        setup()
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    private func initContentView() {
+        //绑定xib
+        let resource = NSNib(nibNamed: String(describing: self.classForCoder.self),
+                             bundle: Bundle(for: self.classForCoder.self))!
+        resource.instantiate(withOwner: self, topLevelObjects: nil)
+        addSubview(contentView)
+        contentView.translatesAutoresizingMaskIntoConstraints = false
+        NSLayoutConstraint.activate([
+            contentView.topAnchor.constraint(equalTo: topAnchor),
+            contentView.leftAnchor.constraint(equalTo: leftAnchor),
+            contentView.rightAnchor.constraint(equalTo: rightAnchor),
+            contentView.bottomAnchor.constraint(equalTo: bottomAnchor)])
+        contentView.updateConstraintsForSubtreeIfNeeded()
+    }
+    
+    func setup() {
         self.contextTextField.font = NSFont.SFProTextRegular(14.0)
         self.contextTextField.textColor = NSColor(hex: "#252629")
         
@@ -40,12 +69,7 @@ class KMSearchCellView: NSTableCellView {
                 } else {
                     self.iconImageView?.image = NSImage(named: "btn_arrow_gray_right_s_norm_on")
                 }
-                
-                let width: NSLayoutConstraint = NSLayoutConstraint(item: self.iconImageView, attribute: .width, relatedBy:.equal, toItem:nil, attribute: .notAnAttribute, multiplier:0.0, constant:12)
             } else {
-                // 宽度约束
-                let width: NSLayoutConstraint = NSLayoutConstraint(item: self.iconImageView, attribute: .width, relatedBy:.equal, toItem:nil, attribute: .notAnAttribute, multiplier:0.0, constant:0)
-                
                 self.contextTextField.attributedStringValue = self.model!.attributedString
                 self.pageIndexTextField.isHidden = true
                 self.iconImageView?.image = nil

+ 62 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Search/View/KMSearchCellView.xib

@@ -0,0 +1,62 @@
+<?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">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMSearchCellView" customModule="PDF_Master" customModuleProvider="target">
+            <connections>
+                <outlet property="contentView" destination="c22-O7-iKe" id="VyT-mo-u8V"/>
+                <outlet property="contextTextField" destination="rgp-Zq-Quc" id="d3f-NX-Q2g"/>
+                <outlet property="iconImageView" destination="OFX-SX-Ei4" id="OFh-Gc-hcH"/>
+                <outlet property="pageIndexTextField" destination="YZy-dU-Vh3" id="Ckl-1n-7XG"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe">
+            <rect key="frame" x="0.0" y="0.0" width="244" height="34"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rgp-Zq-Quc">
+                    <rect key="frame" x="6" y="9" width="4" height="16"/>
+                    <textFieldCell key="cell" enabled="NO" alignment="left" id="ftr-ky-Lia">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+                        <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YZy-dU-Vh3">
+                    <rect key="frame" x="189" y="10" width="37" height="15"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="15" id="NUR-oG-vJi"/>
+                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="yHR-m9-e5B"/>
+                    </constraints>
+                    <textFieldCell key="cell" lineBreakMode="clipping" enabled="NO" alignment="right" title="Label" id="wmZ-Z8-9fQ">
+                        <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>
+                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="OFX-SX-Ei4">
+                    <rect key="frame" x="232" y="11" width="12" height="12"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="12" id="8vK-cO-PfR"/>
+                        <constraint firstAttribute="height" constant="12" id="CTE-c8-j9r"/>
+                    </constraints>
+                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="diw-7u-mPI"/>
+                </imageView>
+            </subviews>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="OFX-SX-Ei4" secondAttribute="trailing" id="BAo-Sv-mph"/>
+                <constraint firstItem="rgp-Zq-Quc" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="8" id="USt-ze-oNU"/>
+                <constraint firstItem="rgp-Zq-Quc" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="Uqt-8w-OVS"/>
+                <constraint firstItem="OFX-SX-Ei4" firstAttribute="leading" secondItem="YZy-dU-Vh3" secondAttribute="trailing" constant="8" id="bTE-ZO-qGz"/>
+                <constraint firstItem="OFX-SX-Ei4" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="o7Y-nL-Qjh"/>
+                <constraint firstItem="YZy-dU-Vh3" firstAttribute="centerY" secondItem="c22-O7-iKe" secondAttribute="centerY" id="t9X-BI-CMs"/>
+            </constraints>
+            <point key="canvasLocation" x="14" y="-191"/>
+        </customView>
+    </objects>
+</document>

+ 9 - 16
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Search/View/KMSearchTableRowView.swift

@@ -22,12 +22,7 @@ class KMSearchTableRowView: NSTableRowView {
     var hoverCallback: KMSearchTableRowViewHoverCallback?
     var rightMouseCallback: KMSearchTableRowViewRightMouseCallback?
     var mouseDownCallback: KMSearchTableRowViewMouseDownCallback?
-    
-    override func awakeFromNib() {
-        super.awakeFromNib()
-        self.addBox()
-    }
-    
+     
     override func draw(_ dirtyRect: NSRect) {
         super.draw(dirtyRect)
         self.addBox()
@@ -49,6 +44,12 @@ class KMSearchTableRowView: NSTableRowView {
                 self.reloadData()
             }
             self.addSubview(self.box!, positioned: NSWindow.OrderingMode.below, relativeTo: self)
+            
+            self.contentBox?.wantsLayer = true
+            self.contentBox = KMBox(frame: self.bounds)
+            self.contentBox?.borderWidth = 0
+            self.contentBox?.boxType = .custom
+            self.contentBox?.autoresizingMask = [.width, .height]
         }
         
         if self.model.datas.count == 0 {
@@ -66,21 +67,13 @@ class KMSearchTableRowView: NSTableRowView {
             rect.size.width = self.bounds.size.width
             self.box?.frame = rect
         }
-        
-        if self.contentBox == nil {
-            let rect = self.bounds
-            self.contentBox?.wantsLayer = true
-            self.contentBox = KMBox(frame: rect)
-            self.contentBox?.borderWidth = 0
-            self.contentBox?.boxType = .custom
-            self.contentBox?.autoresizingMask = [.width, .height]
-        }
+    
         self.addSubview(self.contentBox!, positioned: NSWindow.OrderingMode.above, relativeTo: self)
     }
     
     override func drawSelection(in dirtyRect: NSRect) {
 //        self.model.select = true
-        self.reloadData()
+//        self.reloadData()
     }
     
     override func mouseDown(with event: NSEvent) {

+ 1 - 3
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift

@@ -360,9 +360,7 @@ extension KMToolbarViewController : KMNewToolbarDelegate,NSToolbarItemValidation
             return [KMLeftControlToolbarItemIdentifier, KMToolbarDividerItemIdentifier,
                     KMDocumentZoomToolbarItemIdentifier,
                     KMDocumentZoomOutToolbarItemIdentifier,
-                    KMDocumentZoomViewToolbarItemIdentifier, KMToolbarDividerItemIdentifier,
-                    KMDocumentPreviousPageToolbarItemIdentifier,
-                    KMDocumentNextPageToolbarItemIdentifier]
+                    KMDocumentZoomViewToolbarItemIdentifier, KMToolbarDividerItemIdentifier]
         }
         return []
     }

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

@@ -1532,7 +1532,8 @@ import Cocoa
                 let corp = NSMenuItem(title: NSLocalizedString("Crop", comment: ""), action:#selector(cropCurrentPage), target: self)
 //                corp?.submenu = self.cropMenu()
                 currentMenu.insertItem(corp!, at: currentMenu.items.count)
-                currentMenu.insertItem(self.zoomSelectionMenuItem(), at: currentMenu.items.count)
+                // MARK: 暂时拿掉 2023.04.26
+//                currentMenu.insertItem(self.zoomSelectionMenuItem(), at: currentMenu.items.count)
                 currentMenu.insertItem(self.printingMenu(), at: currentMenu.items.count)
             }
         } else {