Browse Source

【UI替换】编辑工具 - 页眉页脚字体选择优化

lizhe 1 year ago
parent
commit
07067d49d7

+ 61 - 40
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/New/View/KMHeaderFooterView.swift

@@ -45,6 +45,28 @@ let pageFormatArray: [String] = [
     "Page 1 of n"
 ]
 
+
+let fontSizeArray: [String] = [
+    "8",
+    "9",
+    "10",
+    "11",
+    "12",
+    "14",
+    "16",
+    "18",
+    "20",
+    "22",
+    "24",
+    "26",
+    "28",
+    "36",
+    "48",
+    "72",
+    "144",
+    "288",
+]
+
 func convertDateFormat(_ oldString: String) -> String {
     var newString = oldString
     
@@ -155,7 +177,8 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
     var type: KMBatchModifyTemplateType = .Use // Replace with the actual type
     var pdfDocument: CPDFDocument? {
         didSet {
-            self.pdfView.document = pdfDocument
+            self.pdfView.document = self.pdfDocument
+            self.pdfView.headerFooter = self.headerFooterObj
             self.reloadData()
         }
     }
@@ -232,8 +255,6 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
         }
 
         self.textColorWell.color = self.headerFooterObj.getTextColor()
-        self.pdfView.document = self.pdfDocument
-        self.pdfView.headerFooter = self.headerFooterObj
         self.pdfView.autoScales = true
 //        self.pdfView.documentView?.enclosingScrollView?.hasVerticalScroller = false
 //        self.pdfView.documentView?.enclosingScrollView?.hasHorizontalScroller = false
@@ -277,6 +298,11 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
         if self.type == .Use {
             self.batchButton.isHidden = false
         }
+
+        self.fontSizeCombobox.removeAllItems()
+        self.fontSizeCombobox.addItems(withObjectValues: fontSizeArray)
+        self.fontSizeCombobox.isEditable = false
+        self.fontSizeCombobox.delegate = self
     }
 
     override func reloadData() {
@@ -295,21 +321,12 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
         self.topMarginStepper.integerValue = Int(self.headerFooterObj.topMargin)
         self.bottomMarginStepper.integerValue = Int(self.headerFooterObj.bottomMargin)
 
-        var fontSizeArray = [Any]()
-        for i in 0..<self.fontSizeCombobox.objectValues.count {
-            if let obj = self.fontSizeCombobox.objectValues[i] as? NSNumber {
-                fontSizeArray.append(obj.intValue)
-            }
-        }
-
-        self.fontSizeCombobox.removeAllItems()
-        self.fontSizeCombobox.addItems(withObjectValues: fontSizeArray)
-
-        let index = self.fontSizeCombobox.indexOfItem(withObjectValue: self.headerFooterObj.getTextFontSize())
+        let string = Int(self.headerFooterObj.getTextFontSize()).description
+        let index = self.fontSizeCombobox.indexOfItem(withObjectValue: string)
         if index != NSNotFound {
-            self.fontSizeCombobox.selectItem(withObjectValue: self.headerFooterObj.getTextFontSize())
+            self.fontSizeCombobox.selectItem(withObjectValue: string)
         } else {
-            self.fontSizeCombobox.integerValue = Int(self.headerFooterObj.getTextFontSize())
+            self.fontSizeCombobox.stringValue = string
         }
 
         self.dateFormateCombobox.removeAllItems()
@@ -569,7 +586,7 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
             self.updateHeaderFooterString(newString: textView.string, tag: button.tag)
         }
         self.applyButton.isEnabled = true
-        self.pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @objc func menuItem_InsertPage(_ sender: NSMenuItem) {
@@ -580,7 +597,7 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
             self.updateHeaderFooterString(newString: textView.string, tag: button.tag)
         }
         self.applyButton.isEnabled = true
-        self.pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @objc func menuItem_InsertDate(_ sender: NSMenuItem) {
@@ -591,7 +608,7 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
             self.updateHeaderFooterString(newString: textView.string, tag: button.tag)
         }
         self.applyButton.isEnabled = true
-        self.pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     func fetchTargetTextView(tag: Int) -> NSTextView? {
@@ -665,7 +682,7 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
             bottomRightTextView.string.isEmpty
         )
 
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     func saveAsPDFToPath(_ path: String, autoOpen: Bool) {
@@ -910,7 +927,7 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
                 return
             } else {
                 headerFooterObj.pageRangeString = comboBox.stringValue
-                pdfView.needsDisplay = true
+                self.updatePDFView()
             }
         }
     }
@@ -948,6 +965,10 @@ class KMHeaderFooterView: KMBaseXibView, NSTextViewDelegate, NSComboBoxDelegate
             self.updateViewColor()
         }
     }
+    
+    func updatePDFView() {
+        self.pdfView.needsDisplay = true
+    }
 
 }
 
@@ -975,75 +996,75 @@ extension KMHeaderFooterView {
 
     @IBAction func chooseColor(_ sender: NSColorWell) {
         headerFooterObj.textColor =  KMWatermarkAdjectiveText.color(red: sender.color.redComponent, green: sender.color.greenComponent, blue: sender.color.blueComponent, alpha: sender.color.alphaComponent)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func chooseFont(_ sender: NSComboBox) {
-        headerFooterObj.textFont = KMWatermarkAdjectiveText.font(name: "Helvetica", size: CGFloat(sender.integerValue))
-        pdfView.needsDisplay = true
+        headerFooterObj.textFont = KMWatermarkAdjectiveText.font(name: "Helvetica", size: sender.stringValue.stringToCGFloat())
+        self.updatePDFView()
     }
 
     @IBAction func topMarginTextFiedEndEdit(_ sender: NSTextField) {
         topMarginStepper.integerValue = sender.integerValue
         headerFooterObj.topMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func topMarginStepperAction(_ sender: NSStepper) {
         topMargintextField.integerValue = sender.integerValue
         headerFooterObj.topMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func bottomMarginTextFieldEndEdit(_ sender: NSTextField) {
         bottomMarginStepper.integerValue = sender.integerValue
         headerFooterObj.bottomMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func bottomMarginStepperAction(_ sender: NSStepper) {
         bottomMarginTextField.integerValue = sender.integerValue
         headerFooterObj.bottomMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func leftMarginTextFieldEndEdit(_ sender: NSTextField) {
         leftMarginStepper.integerValue = sender.integerValue
         headerFooterObj.leftMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func leftMarginStepperAction(_ sender: NSStepper) {
         leftMarginTextField.integerValue = sender.integerValue
         headerFooterObj.leftMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func rightMarginTextFieldEndEdit(_ sender: NSTextField) {
         rightMarginStepper.integerValue = sender.integerValue
         headerFooterObj.rightMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func rightMarginStepperAction(_ sender: NSStepper) {
         rightMarginTextField.integerValue = sender.integerValue
         headerFooterObj.rightMargin = CGFloat(sender.integerValue)
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func chooseDateFormate(_ sender: NSComboBox) {
         headerFooterObj.dateFormatString = sender.stringValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func choosePageFormate(_ sender: NSComboBox) {
         headerFooterObj.pageFormatString = sender.stringValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func chooseStartPage(_ sender: NSComboBox) {
         headerFooterObj.startString = sender.stringValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func buttonClicked_AddHeaderFooter(_ sender: NSButton) {
@@ -1184,29 +1205,29 @@ extension KMHeaderFooterView {
 
     @IBAction func batesprefixChanged(_ sender: NSTextField) {
         headerFooterObj.batesPrefixString = sender.stringValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func batesSuffixChanged(_ sender: NSTextField) {
         headerFooterObj.batesSuffixString = sender.stringValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func batesNumberChanged(_ sender: NSTextField) {
         batesNumberStepper.integerValue = sender.integerValue
         headerFooterObj.batesDigits = sender.integerValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func bateNumberStepperAction(_ sender: NSStepper) {
         batesNumberTextField.integerValue = sender.integerValue
         headerFooterObj.batesDigits = sender.integerValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 
     @IBAction func batesStartPageComboboxChanged(_ sender: NSComboBox) {
         headerFooterObj.startString = sender.stringValue
-        pdfView.needsDisplay = true
+        self.updatePDFView()
     }
 }
 

+ 56 - 75
PDF Office/PDF Master/Class/PDFTools/AddHeaderFooter/New/View/KMHeaderFooterView.xib

@@ -36,7 +36,7 @@
                 <outlet property="currentPageIndexTextField" destination="HSG-iC-40R" id="eA8-I9-DIB"/>
                 <outlet property="dateFormateCombobox" destination="3L5-ad-pvQ" id="Q3T-8i-U2i"/>
                 <outlet property="dateFormateLabel" destination="hok-sp-iVW" id="m8i-La-FfM"/>
-                <outlet property="fontSizeCombobox" destination="0t9-Xe-FTJ" id="zBc-hV-7cM"/>
+                <outlet property="fontSizeCombobox" destination="ejG-do-b24" id="6n5-Zp-DgG"/>
                 <outlet property="fontSizeLabel" destination="O1K-mL-v3F" id="CL6-zh-mNO"/>
                 <outlet property="formatBox" destination="n3W-zz-qNa" id="W7v-Lg-Tc2"/>
                 <outlet property="formatLabel" destination="sR3-Qp-aDv" id="DJb-yP-VUW"/>
@@ -101,7 +101,7 @@
                                 <rect key="frame" x="4" y="5" width="268" height="74"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bAK-uT-0gL">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bAK-uT-0gL">
                                         <rect key="frame" x="14" y="14" width="33" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="truncatingMiddle" title="label" usesSingleLineMode="YES" id="6nV-vD-hbJ">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -109,7 +109,7 @@
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O1K-mL-v3F">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O1K-mL-v3F">
                                         <rect key="frame" x="14" y="46" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="truncatingMiddle" title="Label" usesSingleLineMode="YES" id="0ig-LK-gxu">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -128,56 +128,31 @@
                                             <action selector="chooseColor:" target="-2" id="0Pt-fT-aM4"/>
                                         </connections>
                                     </colorWell>
-                                    <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0t9-Xe-FTJ">
+                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ejG-do-b24">
                                         <rect key="frame" x="55" y="42" width="201" height="23"/>
                                         <constraints>
-                                            <constraint firstAttribute="width" constant="197" id="BQl-Et-R4l"/>
+                                            <constraint firstAttribute="width" constant="197" id="pJY-Ij-vco"/>
                                         </constraints>
-                                        <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" bezelStyle="round" completes="NO" numberOfVisibleItems="11" id="Mll-bX-WqY">
-                                            <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="EHs-1O-Q1z">
-                                                <real key="minimum" value="0.0"/>
-                                                <real key="maximum" value="1000"/>
-                                            </numberFormatter>
+                                        <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" bezelStyle="round" completes="NO" numberOfVisibleItems="5" id="vw8-rY-8Ab">
                                             <font key="font" metaFont="system"/>
                                             <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            <objectValues>
-                                                <string>8</string>
-                                                <string>9</string>
-                                                <string>10</string>
-                                                <string>11</string>
-                                                <string>12</string>
-                                                <string>14</string>
-                                                <string>16</string>
-                                                <string>18</string>
-                                                <string>20</string>
-                                                <string>22</string>
-                                                <string>24</string>
-                                                <string>26</string>
-                                                <string>28</string>
-                                                <string>36</string>
-                                                <string>48</string>
-                                                <string>72</string>
-                                                <string>144</string>
-                                                <string>288</string>
-                                            </objectValues>
                                         </comboBoxCell>
                                         <connections>
-                                            <action selector="chooseFont:" target="-2" id="nF5-HF-V6Z"/>
+                                            <action selector="chooseFont:" target="-2" id="QVb-Lo-Rb0"/>
                                         </connections>
                                     </comboBox>
                                 </subviews>
                                 <constraints>
-                                    <constraint firstItem="0t9-Xe-FTJ" firstAttribute="centerY" secondItem="O1K-mL-v3F" secondAttribute="centerY" id="5fy-HJ-oRT"/>
-                                    <constraint firstItem="0t9-Xe-FTJ" firstAttribute="leading" secondItem="O1K-mL-v3F" secondAttribute="trailing" constant="7" id="7tC-OP-skU"/>
                                     <constraint firstItem="O1K-mL-v3F" firstAttribute="leading" secondItem="Xd4-bh-Qni" secondAttribute="leading" constant="16" id="BA3-Sx-JlY"/>
                                     <constraint firstItem="Izc-e2-F9m" firstAttribute="centerY" secondItem="bAK-uT-0gL" secondAttribute="centerY" id="CkS-VC-4Vm"/>
                                     <constraint firstAttribute="bottom" secondItem="bAK-uT-0gL" secondAttribute="bottom" constant="14" id="D7K-RC-hpN"/>
                                     <constraint firstItem="bAK-uT-0gL" firstAttribute="leading" secondItem="O1K-mL-v3F" secondAttribute="leading" id="HMi-YH-NsP"/>
-                                    <constraint firstItem="Izc-e2-F9m" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="bAK-uT-0gL" secondAttribute="trailing" constant="7" id="Hbn-Vo-Vgc"/>
+                                    <constraint firstItem="ejG-do-b24" firstAttribute="leading" secondItem="O1K-mL-v3F" secondAttribute="trailing" constant="7" id="HXi-J0-wsT"/>
                                     <constraint firstItem="bAK-uT-0gL" firstAttribute="top" secondItem="O1K-mL-v3F" secondAttribute="bottom" constant="16" id="LGq-hv-Il2"/>
-                                    <constraint firstItem="Izc-e2-F9m" firstAttribute="leading" secondItem="0t9-Xe-FTJ" secondAttribute="leading" id="M6e-ad-8zS"/>
-                                    <constraint firstAttribute="trailing" secondItem="0t9-Xe-FTJ" secondAttribute="trailing" constant="15" id="hKJ-rW-vYy"/>
+                                    <constraint firstItem="ejG-do-b24" firstAttribute="centerY" secondItem="O1K-mL-v3F" secondAttribute="centerY" id="RtU-J1-Vk6"/>
+                                    <constraint firstAttribute="trailing" secondItem="ejG-do-b24" secondAttribute="trailing" constant="15" id="ewv-La-0ML"/>
+                                    <constraint firstItem="Izc-e2-F9m" firstAttribute="leading" secondItem="ejG-do-b24" secondAttribute="leading" id="m7O-g8-AoJ"/>
                                     <constraint firstItem="O1K-mL-v3F" firstAttribute="top" secondItem="Xd4-bh-Qni" secondAttribute="top" constant="12" id="rMh-1m-ZTY"/>
                                 </constraints>
                             </view>
@@ -189,7 +164,7 @@
                                 <font key="font" metaFont="system"/>
                             </buttonCell>
                         </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JUJ-kk-BVa">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JUJ-kk-BVa">
                             <rect key="frame" x="338" y="80" width="37" height="16"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Y3c-Va-d2p">
                                 <font key="font" metaFont="system"/>
@@ -197,7 +172,7 @@
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </textFieldCell>
                         </textField>
-                        <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s7n-Zn-0v3">
+                        <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s7n-Zn-0v3">
                             <rect key="frame" x="381" y="77" width="300" height="21"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="300" id="sKN-m6-f3o"/>
@@ -224,7 +199,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="tzW-3s-hpJ">
                             <rect key="frame" x="130" y="156" width="61" height="22"/>
                             <subviews>
-                                <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HSG-iC-40R">
+                                <textField focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HSG-iC-40R">
                                     <rect key="frame" x="0.0" y="0.0" width="40" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="40" id="5fc-fu-zT3"/>
@@ -242,7 +217,7 @@
                                         <action selector="pageIndexTextFieldEndEdit:" target="-2" id="7TC-tm-hyx"/>
                                     </connections>
                                 </textField>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xUr-Sv-2Fv">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xUr-Sv-2Fv">
                                     <rect key="frame" x="43" y="3" width="20" height="16"/>
                                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="/ 0" id="7a5-yc-ysf">
                                         <font key="font" metaFont="system"/>
@@ -309,7 +284,7 @@ DQ
                                 <rect key="frame" x="4" y="5" width="268" height="74"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S95-bX-5a9">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S95-bX-5a9">
                                         <rect key="frame" x="14" y="46" width="13" height="16"/>
                                         <constraints>
                                             <constraint firstAttribute="width" relation="lessThanOrEqual" constant="40" id="hMT-cu-yc6"/>
@@ -320,7 +295,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TVg-mc-dUt">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TVg-mc-dUt">
                                         <rect key="frame" x="14" y="14" width="13" height="16"/>
                                         <constraints>
                                             <constraint firstAttribute="width" relation="lessThanOrEqual" constant="40" id="mMt-ch-Y38"/>
@@ -331,7 +306,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q0H-X9-fGi">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q0H-X9-fGi">
                                         <rect key="frame" x="142" y="46" width="13" height="16"/>
                                         <constraints>
                                             <constraint firstAttribute="width" relation="lessThanOrEqual" constant="40" id="SAd-iR-u7Z"/>
@@ -342,7 +317,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3Pr-db-mya">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3Pr-db-mya">
                                         <rect key="frame" x="142" y="14" width="13" height="16"/>
                                         <constraints>
                                             <constraint firstAttribute="width" relation="lessThanOrEqual" constant="40" id="97g-JM-RbJ"/>
@@ -353,7 +328,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JiA-9w-KAn">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JiA-9w-KAn">
                                         <rect key="frame" x="32" y="44" width="74" height="21"/>
                                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="tlC-2z-qKk">
                                             <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="9VB-B4-4oh">
@@ -368,7 +343,7 @@ DQ
                                             <action selector="topMarginTextFiedEndEdit:" target="-2" id="QEW-6f-HCG"/>
                                         </connections>
                                     </textField>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KNm-JI-4zb">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KNm-JI-4zb">
                                         <rect key="frame" x="32" y="12" width="74" height="21"/>
                                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="VYS-BA-N6F">
                                             <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="84g-cc-DOx">
@@ -383,7 +358,7 @@ DQ
                                             <action selector="leftMarginTextFieldEndEdit:" target="-2" id="KOY-XB-zov"/>
                                         </connections>
                                     </textField>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8gC-rp-0Zf">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8gC-rp-0Zf">
                                         <rect key="frame" x="160" y="44" width="74" height="21"/>
                                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="2IL-kz-67f">
                                             <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="NrM-f0-tfp">
@@ -426,7 +401,7 @@ DQ
                                             <action selector="rightMarginStepperAction:" target="-2" id="9Y4-TD-KsP"/>
                                         </connections>
                                     </stepper>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lp2-OD-tgd">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lp2-OD-tgd">
                                         <rect key="frame" x="160" y="12" width="74" height="21"/>
                                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="FLo-zp-tle">
                                             <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="mF7-x5-mtF">
@@ -482,7 +457,7 @@ DQ
                                 <rect key="frame" x="4" y="5" width="562" height="40"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hok-sp-iVW">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hok-sp-iVW">
                                         <rect key="frame" x="14" y="12" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Qmc-2b-9iJ">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -490,7 +465,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nQf-EQ-H7P">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nQf-EQ-H7P">
                                         <rect key="frame" x="197" y="12" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="lkh-T9-E3c">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -498,7 +473,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aLf-4y-wNw">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aLf-4y-wNw">
                                         <rect key="frame" x="380" y="12" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="3cG-VC-9jn">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -506,7 +481,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3L5-ad-pvQ">
+                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3L5-ad-pvQ">
                                         <rect key="frame" x="55" y="8" width="129" height="23"/>
                                         <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" bezelStyle="round" completes="NO" numberOfVisibleItems="5" id="CzE-sz-QqX">
                                             <font key="font" metaFont="system"/>
@@ -522,7 +497,7 @@ DQ
                                             <action selector="chooseDateFormate:" target="-2" id="u0K-pK-whm"/>
                                         </connections>
                                     </comboBox>
-                                    <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="d8p-v2-ReK">
+                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="d8p-v2-ReK">
                                         <rect key="frame" x="421" y="8" width="129" height="23"/>
                                         <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" bezelStyle="round" completes="NO" numberOfVisibleItems="5" id="tCx-J5-qRv">
                                             <font key="font" metaFont="system"/>
@@ -533,7 +508,7 @@ DQ
                                             <action selector="choosePageFormate:" target="-2" id="Z24-TF-ual"/>
                                         </connections>
                                     </comboBox>
-                                    <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RpV-jp-NPO">
+                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RpV-jp-NPO">
                                         <rect key="frame" x="238" y="8" width="129" height="23"/>
                                         <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" bezelStyle="round" completes="NO" numberOfVisibleItems="5" id="eQ7-3x-7Dg">
                                             <font key="font" metaFont="system"/>
@@ -586,7 +561,7 @@ DQ
                                 <action selector="buttonClicked_AddHeaderFooter:" target="-2" id="rA0-Eh-LdH"/>
                             </connections>
                         </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7Ag-gu-WZc">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7Ag-gu-WZc">
                             <rect key="frame" x="320" y="311" width="37" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" relation="lessThanOrEqual" constant="165" id="6cG-Fx-tHF"/>
@@ -611,7 +586,7 @@ DQ
                                 <action selector="buttonClicked_AddHeaderFooter:" target="-2" id="yWn-Ge-buS"/>
                             </connections>
                         </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nkf-ld-sIx">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nkf-ld-sIx">
                             <rect key="frame" x="515" y="311" width="37" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" relation="lessThanOrEqual" constant="165" id="Gc7-r9-Uxs"/>
@@ -636,7 +611,7 @@ DQ
                                 <action selector="buttonClicked_AddHeaderFooter:" target="-2" id="ZvQ-Jx-W0n"/>
                             </connections>
                         </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="r3B-V2-quO">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="r3B-V2-quO">
                             <rect key="frame" x="709" y="311" width="37" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" relation="lessThanOrEqual" constant="165" id="Vks-R4-2ZS"/>
@@ -660,6 +635,7 @@ DQ
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         <size key="minSize" width="173" height="38"/>
                                         <size key="maxSize" width="296" height="10000000"/>
+                                        <color key="insertionPointColor" name="textInsertionPointColor" catalog="System" colorSpace="catalog"/>
                                     </textView>
                                 </subviews>
                             </clipView>
@@ -688,6 +664,7 @@ DQ
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         <size key="minSize" width="172" height="38"/>
                                         <size key="maxSize" width="295" height="10000000"/>
+                                        <color key="insertionPointColor" name="textInsertionPointColor" catalog="System" colorSpace="catalog"/>
                                     </textView>
                                 </subviews>
                             </clipView>
@@ -713,6 +690,7 @@ DQ
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         <size key="minSize" width="173" height="38"/>
                                         <size key="maxSize" width="311" height="10000000"/>
+                                        <color key="insertionPointColor" name="textInsertionPointColor" catalog="System" colorSpace="catalog"/>
                                     </textView>
                                 </subviews>
                             </clipView>
@@ -739,7 +717,7 @@ DQ
                                 <action selector="buttonClicked_AddHeaderFooter:" target="-2" id="iZy-DT-tbU"/>
                             </connections>
                         </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fbr-8J-TWt">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fbr-8J-TWt">
                             <rect key="frame" x="320" y="225" width="37" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" relation="lessThanOrEqual" constant="165" id="OWp-qo-aKw"/>
@@ -764,7 +742,7 @@ DQ
                                 <action selector="buttonClicked_AddHeaderFooter:" target="-2" id="cBx-Qz-3NE"/>
                             </connections>
                         </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wcK-XV-cNx">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wcK-XV-cNx">
                             <rect key="frame" x="515" y="225" width="37" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" relation="lessThanOrEqual" constant="165" id="GlF-4y-EI0"/>
@@ -789,7 +767,7 @@ DQ
                                 <action selector="buttonClicked_AddHeaderFooter:" target="-2" id="QKP-XJ-4rc"/>
                             </connections>
                         </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iYT-A0-FBj">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iYT-A0-FBj">
                             <rect key="frame" x="709" y="225" width="37" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="width" relation="lessThanOrEqual" constant="165" id="zSB-he-mQ4"/>
@@ -813,6 +791,7 @@ DQ
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         <size key="minSize" width="173" height="38"/>
                                         <size key="maxSize" width="311" height="10000000"/>
+                                        <color key="insertionPointColor" name="textInsertionPointColor" catalog="System" colorSpace="catalog"/>
                                     </textView>
                                 </subviews>
                             </clipView>
@@ -838,6 +817,7 @@ DQ
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         <size key="minSize" width="172" height="38"/>
                                         <size key="maxSize" width="310" height="10000000"/>
+                                        <color key="insertionPointColor" name="textInsertionPointColor" catalog="System" colorSpace="catalog"/>
                                     </textView>
                                 </subviews>
                             </clipView>
@@ -863,6 +843,7 @@ DQ
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         <size key="minSize" width="173" height="38"/>
                                         <size key="maxSize" width="311" height="10000000"/>
+                                        <color key="insertionPointColor" name="textInsertionPointColor" catalog="System" colorSpace="catalog"/>
                                     </textView>
                                 </subviews>
                             </clipView>
@@ -875,7 +856,7 @@ DQ
                                 <autoresizingMask key="autoresizingMask"/>
                             </scroller>
                         </scrollView>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pl8-oC-BJR">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pl8-oC-BJR">
                             <rect key="frame" x="320" y="137" width="37" height="16"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="HAR-gb-d7a">
                                 <font key="font" metaFont="system"/>
@@ -883,7 +864,7 @@ DQ
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </textFieldCell>
                         </textField>
-                        <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9KN-xu-K6c">
+                        <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9KN-xu-K6c">
                             <rect key="frame" x="361" y="133" width="264" height="23"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="260" id="o4L-dj-zao"/>
@@ -894,7 +875,7 @@ DQ
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </comboBoxCell>
                         </comboBox>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Dm-Np-4eW">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Dm-Np-4eW">
                             <rect key="frame" x="495" y="273" width="24" height="16"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" id="kle-x6-4ba">
                                 <font key="font" metaFont="system"/>
@@ -902,7 +883,7 @@ DQ
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </textFieldCell>
                         </textField>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qnp-05-OwM">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qnp-05-OwM">
                             <rect key="frame" x="689" y="273" width="24" height="16"/>
                             <textFieldCell key="cell" lineBreakMode="clipping" id="Dlj-3E-wy6">
                                 <font key="font" metaFont="system"/>
@@ -916,7 +897,7 @@ DQ
                                 <rect key="frame" x="4" y="5" width="562" height="72"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="J3b-1B-0bF">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="J3b-1B-0bF">
                                         <rect key="frame" x="14" y="44" width="39" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="prefix" id="LwG-TI-bEN">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -924,7 +905,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JCl-im-hjt">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JCl-im-hjt">
                                         <rect key="frame" x="57" y="42" width="214" height="21"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="214" id="PSj-eh-Xlu"/>
@@ -938,7 +919,7 @@ DQ
                                             <action selector="batesprefixChanged:" target="-2" id="awB-dJ-Byi"/>
                                         </connections>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pEl-8s-yqL">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pEl-8s-yqL">
                                         <rect key="frame" x="16" y="13" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="6ih-nM-IKt">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -946,7 +927,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aUx-AC-cyd">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aUx-AC-cyd">
                                         <rect key="frame" x="57" y="11" width="214" height="21"/>
                                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="HcM-cp-NM0">
                                             <font key="font" metaFont="system"/>
@@ -957,7 +938,7 @@ DQ
                                             <action selector="batesSuffixChanged:" target="-2" id="1L6-jB-dBQ"/>
                                         </connections>
                                     </textField>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Y3h-Oz-Qtm">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Y3h-Oz-Qtm">
                                         <rect key="frame" x="289" y="44" width="37" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="IL0-QN-SDs">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -965,7 +946,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jpv-0f-saq">
+                                    <textField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jpv-0f-saq">
                                         <rect key="frame" x="331" y="42" width="85" height="21"/>
                                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="1te-fl-afl">
                                             <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" formatWidth="-1" groupingSize="0" minimumIntegerDigits="1" maximumIntegerDigits="42" id="d4K-Sk-HJE">
@@ -987,7 +968,7 @@ DQ
                                             <action selector="bateNumberStepperAction:" target="-2" id="8nz-hP-Bzo"/>
                                         </connections>
                                     </stepper>
-                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yaR-bZ-yCC">
+                                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yaR-bZ-yCC">
                                         <rect key="frame" x="289" y="14" width="38" height="16"/>
                                         <textFieldCell key="cell" lineBreakMode="clipping" title="1" id="gs7-B4-Atj">
                                             <font key="font" usesAppearanceFont="YES"/>
@@ -995,7 +976,7 @@ DQ
                                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                         </textFieldCell>
                                     </textField>
-                                    <comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vfv-e7-X8g">
+                                    <comboBox focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vfv-e7-X8g">
                                         <rect key="frame" x="330" y="10" width="107" height="23"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="103" id="M6E-iV-B9J"/>
@@ -1043,7 +1024,7 @@ DQ
                                 </constraints>
                             </view>
                         </box>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c3Q-pc-GHJ">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c3Q-pc-GHJ">
                             <rect key="frame" x="336" y="503" width="37" height="18"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="18" id="n8t-aR-MPx"/>
@@ -1054,7 +1035,7 @@ DQ
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </textFieldCell>
                         </textField>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oIM-eE-Kpg">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oIM-eE-Kpg">
                             <rect key="frame" x="630" y="503" width="37" height="18"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="18" id="Bp4-Jp-3iF"/>
@@ -1065,7 +1046,7 @@ DQ
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </textFieldCell>
                         </textField>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sR3-Qp-aDv">
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sR3-Qp-aDv">
                             <rect key="frame" x="336" y="389" width="37" height="18"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="18" id="qTs-wD-ERo"/>

+ 4 - 2
PDF Office/PDF Master/Class/PDFTools/Watermark/New/View/KMWatermarkView.swift

@@ -97,7 +97,10 @@ class KMWatermarkView: KMBaseXibView, NSTextFieldDelegate, NSComboBoxDelegate, N
     var type: KMWatermarkManagerType = .use
     var pdfDocument: CPDFDocument? {
         didSet {
-            self.pdfView.document = pdfDocument
+            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.3) {
+                self.pdfView.watermark = self.watermark
+                self.pdfView.document = CPDFDocument(url: self.pdfDocument?.documentURL)
+            }
 //            self.reloadData()
         }
     }
@@ -125,7 +128,6 @@ class KMWatermarkView: KMBaseXibView, NSTextFieldDelegate, NSComboBoxDelegate, N
     }
     
     override func setup() {
-        pdfView.watermark = watermark
         pdfView.autoScales = true
 //        pdfView.documentView?.enclosingScrollView?.hasVerticalScroller = false
 //        pdfView.documentView?.enclosingScrollView?.hasHorizontalScroller = false