Browse Source

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

tangchao 1 year ago
parent
commit
c3e62f5d5f

+ 30 - 30
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.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="22505" 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="22505"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -53,63 +53,63 @@
             <subviews>
                 <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6Dg-JJ-OII">
                     <rect key="frame" x="5" y="16" width="24" height="24"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="24" id="d4F-pL-KC1"/>
-                        <constraint firstAttribute="height" constant="24" id="lmD-tp-Y3b"/>
-                    </constraints>
                     <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" image="KMImageNameNewHomeUpload" imagePosition="only" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="cwz-Jf-Dxh">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="24" id="d4F-pL-KC1"/>
+                        <constraint firstAttribute="height" constant="24" id="lmD-tp-Y3b"/>
+                    </constraints>
                     <connections>
                         <action selector="homeUploadButtonAction:" target="p5u-KH-T9i" id="7yZ-L4-Fd4"/>
                     </connections>
                 </button>
                 <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ecn-iD-Q3p">
                     <rect key="frame" x="37" y="16" width="24" height="24"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="24" id="Y9O-oD-K3o"/>
-                        <constraint firstAttribute="height" constant="24" id="kuH-aK-X1e"/>
-                    </constraints>
                     <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" image="KMImageNameNewHomeRefresh" imagePosition="only" alignment="center" enabled="NO" imageScaling="proportionallyDown" inset="2" id="Q9D-Q5-JxQ">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="24" id="Y9O-oD-K3o"/>
+                        <constraint firstAttribute="height" constant="24" id="kuH-aK-X1e"/>
+                    </constraints>
                     <connections>
                         <action selector="homeRefreshButtonAction:" target="p5u-KH-T9i" id="I7E-Dx-58D"/>
                     </connections>
                 </button>
                 <popUpButton hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EiE-T7-R1c">
                     <rect key="frame" x="70" y="12" width="86" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="23" id="3Iz-sa-LkT"/>
-                        <constraint firstAttribute="width" constant="80" id="WiQ-Aq-6Wu"/>
-                    </constraints>
                     <popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" alignment="left" lineBreakMode="truncatingTail" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="x9L-D7-UiR">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="menu"/>
                         <menu key="menu" id="zky-xE-ZaB"/>
                     </popUpButtonCell>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="23" id="3Iz-sa-LkT"/>
+                        <constraint firstAttribute="width" constant="80" id="WiQ-Aq-6Wu"/>
+                    </constraints>
                     <connections>
                         <action selector="homeMenuSortAction:" target="p5u-KH-T9i" id="osi-Y3-cTf"/>
                     </connections>
                 </popUpButton>
                 <popUpButton hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="z1h-ey-jyH">
                     <rect key="frame" x="157" y="12" width="91" height="30"/>
-                    <constraints>
-                        <constraint firstAttribute="width" constant="85" id="UE2-sw-btb"/>
-                        <constraint firstAttribute="height" constant="23" id="fmL-vM-z9Z"/>
-                    </constraints>
                     <popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" alignment="left" lineBreakMode="truncatingTail" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="9PT-HP-E0F">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="menu"/>
                         <menu key="menu" id="k6R-yO-KKf"/>
                     </popUpButtonCell>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="85" id="UE2-sw-btb"/>
+                        <constraint firstAttribute="height" constant="23" id="fmL-vM-z9Z"/>
+                    </constraints>
                     <connections>
                         <action selector="homeMenuFilterAction:" target="p5u-KH-T9i" id="W2m-GX-SpP"/>
                     </connections>
                 </popUpButton>
-                <searchField hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cHy-Nv-Dx0">
+                <searchField hidden="YES" wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cHy-Nv-Dx0">
                     <rect key="frame" x="252" y="17" width="154" height="22"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="154" id="21w-Ts-2vx"/>
@@ -150,21 +150,21 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
             <subviews>
                 <button translatesAutoresizingMaskIntoConstraints="NO" id="7AP-ao-9XP">
-                    <rect key="frame" x="227" y="11" width="24" height="24"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="24" id="JXM-7W-E4M"/>
-                        <constraint firstAttribute="width" constant="24" id="bTP-JL-8Nw"/>
-                    </constraints>
+                    <rect key="frame" x="251" y="11" width="0.0" height="24"/>
                     <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="Icon_other_avatar_false" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="0Ic-7f-T5r">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
                     </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="24" id="JXM-7W-E4M"/>
+                        <constraint firstAttribute="width" id="bTP-JL-8Nw"/>
+                    </constraints>
                     <connections>
                         <action selector="userInfoButtonAction:" target="xy6-xE-uD2" id="UcG-2p-rY4"/>
                     </connections>
                 </button>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="WXF-Ar-JGk" customClass="KMSegmentedBox" customModule="PDF_Master" customModuleProvider="target">
-                    <rect key="frame" x="129" y="11" width="94" height="24"/>
+                    <rect key="frame" x="153" y="11" width="94" height="24"/>
                     <view key="contentView" id="pfi-aZ-YRi">
                         <rect key="frame" x="0.0" y="0.0" width="94" height="24"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -179,7 +179,7 @@
                                         </constraints>
                                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="icon_button_upgrade" id="Wx4-fK-h42"/>
                                     </imageView>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7Vr-Dd-FWW">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7Vr-Dd-FWW">
                                         <rect key="frame" x="6" y="4" width="78" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Upgrade" id="41X-ZH-ABW">
                                             <font key="font" metaFont="system"/>
@@ -256,7 +256,7 @@
             <rect key="frame" x="0.0" y="0.0" width="145" height="22"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
-                <textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fpA-OK-Dmu">
+                <textField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fpA-OK-Dmu">
                     <rect key="frame" x="0.0" y="0.0" width="141" height="22"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" bezelStyle="round" id="Uh2-C6-6bu">
@@ -323,7 +323,7 @@
                 <rect key="frame" x="0.0" y="0.0" width="369" height="111"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qnn-nL-aSY">
+                    <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qnn-nL-aSY">
                         <rect key="frame" x="17" y="74" width="132" height="17"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <textFieldCell key="cell" sendsActionOnEndEditing="YES" id="Ggh-Y3-dbT">
@@ -332,7 +332,7 @@
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="d0C-39-EiO" userLabel="Static Text - left Files…">
+                    <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="d0C-39-EiO" userLabel="Static Text - left Files…">
                         <rect key="frame" x="276" y="67" width="76" height="14"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <textFieldCell key="cell" sendsActionOnEndEditing="YES" id="odO-pQ-8fS">
@@ -370,7 +370,7 @@ Gw
             <rect key="frame" x="0.0" y="0.0" width="483" height="40"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
             <subviews>
-                <button hidden="YES" fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="akd-QH-92I" customClass="NewTabButton">
+                <button hidden="YES" imageHugsTitle="YES" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="akd-QH-92I" customClass="NewTabButton">
                     <rect key="frame" x="295" y="0.0" width="40" height="27"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                     <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" imagePosition="only" alignment="center" state="on" imageScaling="proportionallyDown" inset="2" id="PTU-yU-XC9">

+ 1 - 1
PDF Office/PDF Master/Class/DigtalSignature/CPDFDigtalView/CPDFDigtalView.m

@@ -60,7 +60,7 @@
 }
 
 - (CPDFPage *)pageAndPoint:(NSPoint *)point forEvent:(NSEvent *)event nearest:(BOOL)nearest {
-    NSPoint p = [event locationInPDFListView:self];
+    NSPoint p = [self convertPoint:[event locationInWindow] fromView:nil];
     CPDFPage *page = [self pageForPoint:p nearest:nearest];
     if (page && point)
         *point = [self convertPoint:p toPage:page];

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

@@ -2246,14 +2246,15 @@ extension KMMainViewController {
             currentPageIndex = UInt(index)
         }
         
-        digitalSignController?.buttonActionBlock = { [weak self] type, isChanged in
-            guard let self = self else { return }
-            
+        digitalSignController?.buttonActionBlock = { [unowned self] type, isChanged in
             if type == .cancel {
 //                self.toolbarController?.digitalSignModeButtonAction(nil)
                 if let page = self.listView.document?.page(at: currentPageIndex) {
                     self.listView.go(to: page)
                 }
+                
+                self.digitalSignController?.view.removeFromSuperview()
+                self.digitalSignController = nil
             }
         }