Browse Source

综合-编辑属性面板去除多选对齐区域和偶发的crash

tangchao 1 year ago
parent
commit
4b08615076

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

@@ -1,7 +1,7 @@
 <?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="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -50,13 +50,13 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <box borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="qjn-Az-nK1">
-                                <rect key="frame" x="10" y="252" width="240" height="56"/>
+                                <rect key="frame" x="7" y="248" width="246" height="62"/>
                                 <view key="contentView" id="vpF-9O-Amq">
-                                    <rect key="frame" x="0.0" y="0.0" width="240" height="56"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="246" height="62"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
                                         <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XPI-yz-g9u">
-                                            <rect key="frame" x="-2" y="40" width="49" height="16"/>
+                                            <rect key="frame" x="-2" y="46" width="49" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="opacity" id="LXH-cy-YvE">
                                                 <font key="font" usesAppearanceFont="YES"/>
                                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -64,7 +64,7 @@
                                             </textFieldCell>
                                         </textField>
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="GOt-dw-CGs">
-                                            <rect key="frame" x="0.0" y="0.0" width="240" height="32"/>
+                                            <rect key="frame" x="0.0" y="6" width="246" height="32"/>
                                             <subviews>
                                                 <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Z0O-zt-cBQ">
                                                     <rect key="frame" x="-2" y="0.0" width="144" height="28"/>
@@ -74,7 +74,7 @@
                                                     <sliderCell key="cell" state="on" alignment="left" maxValue="1" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="RhD-fs-Ulr"/>
                                                 </slider>
                                                 <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="9ig-7b-xDq">
-                                                    <rect key="frame" x="158" y="0.0" width="82" height="32"/>
+                                                    <rect key="frame" x="164" y="0.0" width="82" height="32"/>
                                                     <view key="contentView" id="fr5-qz-wFC">
                                                         <rect key="frame" x="0.0" y="0.0" width="82" height="32"/>
                                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -108,19 +108,19 @@
                                 </constraints>
                             </box>
                             <box borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="6yW-By-Sg9">
-                                <rect key="frame" x="0.0" y="324" width="260" height="176"/>
+                                <rect key="frame" x="-3" y="320" width="266" height="182"/>
                                 <view key="contentView" id="IgG-3G-s7G">
-                                    <rect key="frame" x="0.0" y="0.0" width="260" height="176"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="266" height="182"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
                                         <box boxType="custom" borderWidth="0.0" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="5y4-Y4-XuO">
-                                            <rect key="frame" x="16" y="40" width="228" height="88"/>
+                                            <rect key="frame" x="16" y="46" width="234" height="88"/>
                                             <view key="contentView" id="dSO-bL-F8j">
-                                                <rect key="frame" x="0.0" y="0.0" width="228" height="88"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="234" height="88"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                 <subviews>
                                                     <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1u5-mk-ax5">
-                                                        <rect key="frame" x="0.0" y="0.0" width="228" height="88"/>
+                                                        <rect key="frame" x="0.0" y="0.0" width="234" height="88"/>
                                                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="8rr-97-nmW"/>
                                                     </imageView>
                                                 </subviews>
@@ -136,7 +136,7 @@
                                             </constraints>
                                         </box>
                                         <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="x6y-yu-lpY">
-                                            <rect key="frame" x="14" y="144" width="41" height="16"/>
+                                            <rect key="frame" x="14" y="150" width="41" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Image" id="F3k-6q-vFG">
                                                 <font key="font" usesAppearanceFont="YES"/>
                                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -144,10 +144,10 @@
                                             </textFieldCell>
                                         </textField>
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="gfr-NP-NnO">
-                                            <rect key="frame" x="16" y="0.0" width="228" height="32"/>
+                                            <rect key="frame" x="16" y="6" width="234" height="32"/>
                                             <subviews>
                                                 <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="hsv-dq-f4W">
-                                                    <rect key="frame" x="42" y="0.0" width="32" height="32"/>
+                                                    <rect key="frame" x="45" y="0.0" width="32" height="32"/>
                                                     <view key="contentView" id="Pfc-MX-L5k">
                                                         <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
                                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -159,7 +159,7 @@
                                                     <color key="fillColor" red="0.92156862750000001" green="0.92156862750000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </box>
                                                 <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="q4N-oj-5zS">
-                                                    <rect key="frame" x="82" y="0.0" width="32" height="32"/>
+                                                    <rect key="frame" x="85" y="0.0" width="32" height="32"/>
                                                     <view key="contentView" id="wjS-FB-lYU">
                                                         <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
                                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -171,7 +171,7 @@
                                                     <color key="fillColor" red="0.92156862750000001" green="0.92156862750000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </box>
                                                 <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="yYT-gS-HFj">
-                                                    <rect key="frame" x="122" y="0.0" width="32" height="32"/>
+                                                    <rect key="frame" x="125" y="0.0" width="32" height="32"/>
                                                     <view key="contentView" id="RHD-oQ-JTw">
                                                         <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
                                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -183,7 +183,7 @@
                                                     <color key="fillColor" red="0.92156862750000001" green="0.92156862750000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                 </box>
                                                 <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="qRi-Cl-0oE">
-                                                    <rect key="frame" x="162" y="0.0" width="32" height="32"/>
+                                                    <rect key="frame" x="165" y="0.0" width="32" height="32"/>
                                                     <view key="contentView" id="31k-6d-FoY">
                                                         <rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
                                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -307,7 +307,7 @@
                                     <constraint firstAttribute="height" constant="112" id="q4K-hM-hqe"/>
                                 </constraints>
                             </box>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="3AP-7h-Nfc" customClass="KMEditPropertyAlignmentView" customModule="PDF_Master" customModuleProvider="target">
+                            <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3AP-7h-Nfc" customClass="KMEditPropertyAlignmentView" customModule="PDF_Master" customModuleProvider="target">
                                 <rect key="frame" x="16" y="8" width="228" height="100"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="100" id="fcW-mh-2WD"/>

+ 7 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/EditPDF/KMEditPDFTextPropertyViewController.swift

@@ -105,6 +105,13 @@ class KMEditPDFTextPropertyViewController: NSViewController {
         }
     }
     
+    deinit {
+        KMPrint("KMEditPDFTextPropertyViewController 已释放.")
+        NSColorPanel.shared.setTarget(nil)
+        NSColorPanel.shared.setAction(nil)
+        KMPrint("\(self)")
+    }
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         self.setup()

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

@@ -1,7 +1,7 @@
 <?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="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
         <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>
@@ -281,7 +281,7 @@
                                     <constraint firstAttribute="bottom" secondItem="cZ0-Lb-7rt" secondAttribute="bottom" id="zHr-Q3-Fwg"/>
                                 </constraints>
                             </customView>
-                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="Oi3-L1-ffT" customClass="KMEditPropertyAlignmentView" customModule="PDF_Master" customModuleProvider="target">
+                            <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Oi3-L1-ffT" customClass="KMEditPropertyAlignmentView" customModule="PDF_Master" customModuleProvider="target">
                                 <rect key="frame" x="16" y="187" width="228" height="100"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="100" id="lQ0-Zl-AJK"/>