Browse Source

【2025】【Markup】测量模块预处理

niehaoyu 2 months ago
parent
commit
4cc3394244

+ 29 - 13
PDF Office/PDF Master/Class/PDFTools/Measure/Window/CAreaMeasureInfoWindowController.swift

@@ -7,6 +7,7 @@
 
 import Cocoa
 import ComPDFKit
+import KMComponentLibrary
 
 @objc protocol CAreaMeasureInfoWindowControllerDelegate: AnyObject {
     @objc optional func areaMeasureInfoWindowControllerSetting(_ areaMeasureInfoWindowController: CAreaMeasureInfoWindowController)
@@ -23,7 +24,6 @@ class CAreaMeasureInfoWindowController: NSWindowController {
     @IBOutlet weak var areaLabel: NSTextField!
     @IBOutlet weak var precisionLabel: NSTextField!
     @IBOutlet weak var angleLabel: NSTextField!
-    @IBOutlet weak var settingsButton: NSButton!
 
     weak var delegate: CAreaMeasureInfoWindowControllerDelegate?
 
@@ -43,17 +43,37 @@ class CAreaMeasureInfoWindowController: NSWindowController {
         self.window?.level = .floating
         commonInit()
         configurationLanguage()
+        
+        refreshUI()
     }
     
-    private func configurationLanguage() {
-        titleLabel.stringValue = NSLocalizedString("Polygon", comment: "")
-        scaleTitleLabel.stringValue = NSLocalizedString("Scale:", comment: "")
-        areaTitleLabel.stringValue = NSLocalizedString("Area", comment: "") + ":"
-        precisionTitleLabel.stringValue = NSLocalizedString("Precision", comment: "") + ":"
-        angleTitleLabel.stringValue = NSLocalizedString("Angle", comment: "") + ":"
-        settingsButton.title = NSLocalizedString("Settings", comment: "")
+    func refreshUI() {
+        titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+         
+        for label in [scaleTitleLabel, areaTitleLabel, precisionTitleLabel, angleTitleLabel,
+                      scaleLabel, areaLabel, precisionLabel, angleLabel] as! [NSTextField] {
+            label.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-regular")
+        }
+        
+        for label in [scaleTitleLabel, areaTitleLabel, precisionTitleLabel, angleTitleLabel,
+                      scaleLabel, precisionLabel] as! [NSTextField] {
+            label.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        }
+        
+        for label in [areaLabel, angleLabel] as! [NSTextField] {
+            label.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorPrimary/text")
+        }
     }
     
+    private func configurationLanguage() {
+        titleLabel.stringValue = KMLocalizedString("Polygon")
+        scaleTitleLabel.stringValue = KMLocalizedString("Scale:")
+        areaTitleLabel.stringValue = KMLocalizedString("Area") + ":"
+        precisionTitleLabel.stringValue = KMLocalizedString("Precision") + ":"
+        angleTitleLabel.stringValue = KMLocalizedString("Angle") + ":"
+     }
+    
     private func commonInit() {
         scaleLabel.stringValue = String(format: "%0.0f %@ = %0.0f %@", measureInfo.rulerBase, measureInfo.rulerBaseUnit, measureInfo.rulerTranslate, measureInfo.rulerTranslateUnit)
         switch measureInfo.precision {
@@ -100,9 +120,5 @@ class CAreaMeasureInfoWindowController: NSWindowController {
             break
         }
     }
-
-    @IBAction func buttonItemClick_Setting(_ sender: Any) {
-        delegate?.areaMeasureInfoWindowControllerSetting?(self)
-    }
-
+ 
 }

+ 55 - 116
PDF Office/PDF Master/Class/PDFTools/Measure/Window/CAreaMeasureInfoWindowController.xib

@@ -16,152 +16,95 @@
                 <outlet property="precisionTitleLabel" destination="Kag-pg-b5k" id="pG6-8d-dIA"/>
                 <outlet property="scaleLabel" destination="mC7-Nw-srr" id="U7s-fF-Jj2"/>
                 <outlet property="scaleTitleLabel" destination="6j1-fh-lBh" id="L3x-X5-tWU"/>
-                <outlet property="settingsButton" destination="Osm-N0-8Pg" id="7WU-VK-NuD"/>
                 <outlet property="titleLabel" destination="cee-VO-HNn" id="zxU-2p-MSg"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titlebarAppearsTransparent="YES" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
+        <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titlebarAppearsTransparent="YES" titleVisibility="hidden" id="F0z-JX-Cv5">
+            <windowStyleMask key="styleMask" titled="YES" fullSizeContentView="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="1596" y="727" width="360" height="230"/>
+            <rect key="contentRect" x="1596" y="727" width="240" height="230"/>
             <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
+            <value key="minSize" type="size" width="240" height="230"/>
+            <value key="maxSize" type="size" width="240" height="230"/>
             <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="360" height="162"/>
+                <rect key="frame" x="0.0" y="0.0" width="240" height="153"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="v9s-IY-XsA">
-                        <rect key="frame" x="20" y="147" width="16" height="16"/>
-                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ImageNameToolbarPolyline" id="kiE-29-y6X"/>
-                    </imageView>
                     <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cee-VO-HNn">
-                        <rect key="frame" x="40" y="146" width="159" height="17"/>
+                        <rect key="frame" x="14" y="120" width="159" height="17"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Polygonal Measurement" id="Y8Y-yj-XlX">
                             <font key="font" metaFont="system" size="14"/>
                             <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Osm-N0-8Pg">
-                        <rect key="frame" x="260" y="10" width="80" height="16"/>
-                        <buttonCell key="cell" type="bevel" title="Setting" bezelStyle="rounded" alignment="center" controlSize="large" imageScaling="proportionallyDown" inset="2" id="FHK-Fu-atW">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="80" id="KVI-O4-OVm"/>
-                        </constraints>
-                        <connections>
-                            <action selector="buttonItemClick_Setting:" target="-2" id="C0Y-jH-ycy"/>
-                        </connections>
-                    </button>
-                    <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FzA-5Y-Luz">
-                        <rect key="frame" x="175" y="8" width="67" height="20"/>
-                        <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="rounded" alignment="center" controlSize="large" imageScaling="proportionallyDown" inset="2" id="eWo-di-gcS">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-Gw
-</string>
-                        </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="67" id="KZl-vC-61h"/>
-                            <constraint firstAttribute="height" constant="20" id="QGG-rF-oUh"/>
-                        </constraints>
-                    </button>
                     <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="h2R-IC-xn2">
-                        <rect key="frame" x="42" y="46" width="64" height="92"/>
+                        <rect key="frame" x="16" y="16" width="241" height="92"/>
                         <view key="contentView" id="37A-jf-t8u">
-                            <rect key="frame" x="0.0" y="0.0" width="64" height="92"/>
+                            <rect key="frame" x="0.0" y="0.0" width="241" height="92"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6j1-fh-lBh">
-                                    <rect key="frame" x="-2" y="75" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Scale:" id="KiM-aI-iiB">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SiO-Wc-d1h">
+                                    <rect key="frame" x="-2" y="75" width="38" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Area:" id="TCW-6X-SlN">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SiO-Wc-d1h">
-                                    <rect key="frame" x="-2" y="50" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Area:" id="TCW-6X-SlN">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C0Q-oq-d66">
+                                    <rect key="frame" x="36" y="75" width="13" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="uZp-Xm-LgT">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4AM-g2-hiQ">
-                                    <rect key="frame" x="-2" y="25" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Angle:" id="gC6-0m-Suy">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6j1-fh-lBh">
+                                    <rect key="frame" x="-2" y="50" width="44" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Scale:" id="KiM-aI-iiB">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Kag-pg-b5k">
-                                    <rect key="frame" x="-2" y="0.0" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Precision:" id="7R4-7K-bBV">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YcG-qm-931">
+                                    <rect key="frame" x="42" y="50" width="13" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="Maf-E1-5c8">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="Kag-pg-b5k" firstAttribute="top" secondItem="4AM-g2-hiQ" secondAttribute="bottom" constant="8" id="77A-D0-kg8"/>
-                                <constraint firstAttribute="bottom" secondItem="Kag-pg-b5k" secondAttribute="bottom" id="7T6-QF-dxM"/>
-                                <constraint firstItem="Kag-pg-b5k" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="7qV-Gi-zox"/>
-                                <constraint firstItem="SiO-Wc-d1h" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="S0C-LW-Pss"/>
-                                <constraint firstItem="6j1-fh-lBh" firstAttribute="top" secondItem="37A-jf-t8u" secondAttribute="top" id="UJT-6k-WnX"/>
-                                <constraint firstAttribute="trailing" secondItem="Kag-pg-b5k" secondAttribute="trailing" id="aNj-lX-6Zl"/>
-                                <constraint firstAttribute="trailing" secondItem="6j1-fh-lBh" secondAttribute="trailing" id="g8O-g8-GvS"/>
-                                <constraint firstAttribute="trailing" secondItem="SiO-Wc-d1h" secondAttribute="trailing" id="hgu-8V-g5U"/>
-                                <constraint firstItem="SiO-Wc-d1h" firstAttribute="top" secondItem="6j1-fh-lBh" secondAttribute="bottom" constant="8" id="hjd-rm-vRP"/>
-                                <constraint firstAttribute="trailing" secondItem="4AM-g2-hiQ" secondAttribute="trailing" id="lkQ-pM-Ice"/>
-                                <constraint firstItem="6j1-fh-lBh" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="nQ3-Op-f1M"/>
-                                <constraint firstItem="4AM-g2-hiQ" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="toZ-Kl-oFO"/>
-                                <constraint firstItem="4AM-g2-hiQ" firstAttribute="top" secondItem="SiO-Wc-d1h" secondAttribute="bottom" constant="8" id="xcv-8b-m1t"/>
-                            </constraints>
-                        </view>
-                    </box>
-                    <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="lW1-Lk-F1X">
-                        <rect key="frame" x="130" y="46" width="140" height="92"/>
-                        <view key="contentView" id="Jjd-QB-8ze">
-                            <rect key="frame" x="0.0" y="0.0" width="140" height="92"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mC7-Nw-srr">
-                                    <rect key="frame" x="-2" y="75" width="144" height="17"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="140" id="Xph-t8-Mx7"/>
-                                    </constraints>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="1 cm = 1 cm" id="tmi-ng-Vu3">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4AM-g2-hiQ">
+                                    <rect key="frame" x="-2" y="25" width="45" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Angle:" id="gC6-0m-Suy">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C0Q-oq-d66">
-                                    <rect key="frame" x="-2" y="50" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="uZp-Xm-LgT">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mC7-Nw-srr">
+                                    <rect key="frame" x="43" y="25" width="80" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="1 cm = 1 cm" id="tmi-ng-Vu3">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YcG-qm-931">
-                                    <rect key="frame" x="-2" y="25" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="Maf-E1-5c8">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Kag-pg-b5k">
+                                    <rect key="frame" x="-2" y="0.0" width="68" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Precision:" id="7R4-7K-bBV">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
                                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GbN-aH-zzt">
-                                    <rect key="frame" x="-2" y="0.0" width="144" height="17"/>
+                                    <rect key="frame" x="66" y="0.0" width="13" height="17"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="RGC-aS-4SL">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -170,37 +113,36 @@ Gw
                                 </textField>
                             </subviews>
                             <constraints>
-                                <constraint firstItem="C0Q-oq-d66" firstAttribute="top" secondItem="mC7-Nw-srr" secondAttribute="bottom" constant="8" id="2gy-K0-XRQ"/>
-                                <constraint firstItem="mC7-Nw-srr" firstAttribute="top" secondItem="Jjd-QB-8ze" secondAttribute="top" id="3H0-Rt-2uA"/>
-                                <constraint firstAttribute="trailing" secondItem="mC7-Nw-srr" secondAttribute="trailing" id="9fW-O2-dup"/>
-                                <constraint firstItem="YcG-qm-931" firstAttribute="leading" secondItem="Jjd-QB-8ze" secondAttribute="leading" id="E3u-Wd-juZ"/>
-                                <constraint firstAttribute="trailing" secondItem="C0Q-oq-d66" secondAttribute="trailing" id="EV4-ul-Gep"/>
-                                <constraint firstItem="C0Q-oq-d66" firstAttribute="leading" secondItem="Jjd-QB-8ze" secondAttribute="leading" id="NBM-gK-zWF"/>
-                                <constraint firstAttribute="trailing" secondItem="YcG-qm-931" secondAttribute="trailing" id="NNE-Qd-eGn"/>
-                                <constraint firstItem="GbN-aH-zzt" firstAttribute="top" secondItem="YcG-qm-931" secondAttribute="bottom" constant="8" id="gOA-6K-r4Z"/>
-                                <constraint firstAttribute="bottom" secondItem="GbN-aH-zzt" secondAttribute="bottom" id="qpP-q4-qNk"/>
-                                <constraint firstItem="mC7-Nw-srr" firstAttribute="leading" secondItem="Jjd-QB-8ze" secondAttribute="leading" id="srb-WZ-v1d"/>
-                                <constraint firstAttribute="trailing" secondItem="GbN-aH-zzt" secondAttribute="trailing" id="t2n-5M-6iF"/>
-                                <constraint firstItem="YcG-qm-931" firstAttribute="top" secondItem="C0Q-oq-d66" secondAttribute="bottom" constant="8" id="uRr-05-2vD"/>
-                                <constraint firstItem="GbN-aH-zzt" firstAttribute="leading" secondItem="Jjd-QB-8ze" secondAttribute="leading" id="yrI-7j-WHE"/>
+                                <constraint firstItem="YcG-qm-931" firstAttribute="leading" secondItem="6j1-fh-lBh" secondAttribute="trailing" constant="4" id="28x-rY-8oy"/>
+                                <constraint firstItem="Kag-pg-b5k" firstAttribute="top" secondItem="4AM-g2-hiQ" secondAttribute="bottom" constant="8" id="3HJ-K7-tSv"/>
+                                <constraint firstItem="C0Q-oq-d66" firstAttribute="centerY" secondItem="SiO-Wc-d1h" secondAttribute="centerY" id="GUM-Ks-tjU"/>
+                                <constraint firstItem="GbN-aH-zzt" firstAttribute="centerY" secondItem="Kag-pg-b5k" secondAttribute="centerY" id="IUD-Wq-z5R"/>
+                                <constraint firstItem="SiO-Wc-d1h" firstAttribute="top" secondItem="37A-jf-t8u" secondAttribute="top" id="KPU-cB-R3b"/>
+                                <constraint firstItem="6j1-fh-lBh" firstAttribute="top" secondItem="SiO-Wc-d1h" secondAttribute="bottom" constant="8" id="Pqt-iN-jlY"/>
+                                <constraint firstItem="6j1-fh-lBh" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="W2P-fn-zWy"/>
+                                <constraint firstAttribute="bottom" secondItem="Kag-pg-b5k" secondAttribute="bottom" id="Xp9-fF-NtU"/>
+                                <constraint firstItem="GbN-aH-zzt" firstAttribute="leading" secondItem="Kag-pg-b5k" secondAttribute="trailing" constant="4" id="bEt-oF-ePA"/>
+                                <constraint firstItem="SiO-Wc-d1h" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="cGi-KR-qrD"/>
+                                <constraint firstItem="mC7-Nw-srr" firstAttribute="leading" secondItem="4AM-g2-hiQ" secondAttribute="trailing" constant="4" id="chE-8n-rGu"/>
+                                <constraint firstItem="4AM-g2-hiQ" firstAttribute="top" secondItem="6j1-fh-lBh" secondAttribute="bottom" constant="8" id="e0E-K5-KNw"/>
+                                <constraint firstItem="mC7-Nw-srr" firstAttribute="centerY" secondItem="4AM-g2-hiQ" secondAttribute="centerY" id="gjo-hO-4Gj"/>
+                                <constraint firstItem="C0Q-oq-d66" firstAttribute="leading" secondItem="SiO-Wc-d1h" secondAttribute="trailing" constant="4" id="h9h-zQ-ide"/>
+                                <constraint firstItem="YcG-qm-931" firstAttribute="centerY" secondItem="6j1-fh-lBh" secondAttribute="centerY" id="lks-7l-yC2"/>
+                                <constraint firstItem="4AM-g2-hiQ" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="x8B-mY-sgO"/>
+                                <constraint firstItem="Kag-pg-b5k" firstAttribute="leading" secondItem="37A-jf-t8u" secondAttribute="leading" id="z8j-wn-Bxi"/>
                             </constraints>
                         </view>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="241" id="mBT-cx-yij"/>
+                        </constraints>
                     </box>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="cee-VO-HNn" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="-1" id="1Xv-45-1hU"/>
-                    <constraint firstItem="lW1-Lk-F1X" firstAttribute="leading" secondItem="h2R-IC-xn2" secondAttribute="trailing" constant="24" id="7rY-YP-PYi"/>
-                    <constraint firstAttribute="bottom" secondItem="Osm-N0-8Pg" secondAttribute="bottom" constant="10" id="9ET-RX-LnV"/>
-                    <constraint firstItem="Osm-N0-8Pg" firstAttribute="leading" secondItem="FzA-5Y-Luz" secondAttribute="trailing" constant="18" id="AXP-aJ-1cH"/>
-                    <constraint firstItem="lW1-Lk-F1X" firstAttribute="top" secondItem="h2R-IC-xn2" secondAttribute="top" id="Fy0-qM-VO8"/>
-                    <constraint firstItem="v9s-IY-XsA" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="OyK-oa-oNj"/>
+                    <constraint firstAttribute="bottom" secondItem="h2R-IC-xn2" secondAttribute="bottom" constant="16" id="TCT-lm-dbR"/>
                     <constraint firstItem="h2R-IC-xn2" firstAttribute="leading" secondItem="cee-VO-HNn" secondAttribute="leading" id="Uqg-Rp-LoB"/>
-                    <constraint firstItem="cee-VO-HNn" firstAttribute="leading" secondItem="v9s-IY-XsA" secondAttribute="trailing" constant="6" id="f2a-cN-Jzb"/>
-                    <constraint firstItem="h2R-IC-xn2" firstAttribute="top" secondItem="cee-VO-HNn" secondAttribute="bottom" constant="8" id="mZw-Qu-LPr"/>
-                    <constraint firstItem="Osm-N0-8Pg" firstAttribute="centerY" secondItem="FzA-5Y-Luz" secondAttribute="centerY" id="n2S-yM-92u"/>
-                    <constraint firstItem="Osm-N0-8Pg" firstAttribute="top" secondItem="lW1-Lk-F1X" secondAttribute="bottom" constant="20" id="p9C-H1-zTN"/>
-                    <constraint firstAttribute="trailing" secondItem="Osm-N0-8Pg" secondAttribute="trailing" constant="20" id="pqF-db-YYm"/>
-                    <constraint firstItem="cee-VO-HNn" firstAttribute="centerY" secondItem="v9s-IY-XsA" secondAttribute="centerY" id="qhH-KN-n3Y"/>
+                    <constraint firstItem="cee-VO-HNn" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="16" id="X6z-N4-yNa"/>
+                    <constraint firstItem="h2R-IC-xn2" firstAttribute="top" secondItem="cee-VO-HNn" secondAttribute="bottom" constant="12" id="mZw-Qu-LPr"/>
+                    <constraint firstItem="cee-VO-HNn" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="16" id="owR-OV-oww"/>
                 </constraints>
             </view>
             <connections>
@@ -209,7 +151,4 @@ Gw
             <point key="canvasLocation" x="-28" y="144"/>
         </window>
     </objects>
-    <resources>
-        <image name="ImageNameToolbarPolyline" width="16" height="16"/>
-    </resources>
 </document>

+ 31 - 24
PDF Office/PDF Master/Class/PDFTools/Measure/Window/CDistanceMeasureInfoWindowController.swift

@@ -6,10 +6,10 @@
 //
 
 import Cocoa
+import KMComponentLibrary
 
 protocol CDistanceMeasureInfoWindowControllerDelegate: AnyObject {
-    func distanceMeasureInfoWindowControllerSetting(_ distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController)
-    func cancelMeasureInfoWindowControllerSetting(_ distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController)
+    
 }
 
 @objcMembers
@@ -29,8 +29,6 @@ class CDistanceMeasureInfoWindowController: NSWindowController {
     @IBOutlet weak var angleLabel: NSTextField!
     @IBOutlet weak var xLabel: NSTextField!
     @IBOutlet weak var yLabel: NSTextField!
-    @IBOutlet weak var cancelButton: NSButton!
-    @IBOutlet weak var settingsButton: NSButton!
 
     weak var delegate: CDistanceMeasureInfoWindowControllerDelegate?
     
@@ -42,24 +40,40 @@ class CDistanceMeasureInfoWindowController: NSWindowController {
     
     override func windowDidLoad() {
         super.windowDidLoad()
-        
-        cancelButton.stringValue = NSLocalizedString("Cancel", comment: "")
-
+         
         self.window?.level = .floating
         commonInit()
         configurationLanguage()
+        
+        refreshUI()
+    }
+    
+    func refreshUI() {
+        titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        for label in [lengthLabel, lengthTitleLabel, angleLabel, angleTitleLabel, xLabel, xTitleLabel, yLabel, yTitleLabel, scaleLabel, scaleTitleLabel, precisionLabel, precisionTitleLabel] as! [NSTextField] {
+            label.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-regular")
+        }
+        
+        for label in [lengthTitleLabel, angleTitleLabel, xTitleLabel, yTitleLabel, scaleTitleLabel, precisionTitleLabel] as! [NSTextField] {
+            label.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        }
+        
+        for label in [lengthLabel, angleLabel, xLabel, yLabel] as! [NSTextField] {
+            label.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorPrimary/text")
+        }
     }
     
     private func configurationLanguage() {
-        titleLabel.stringValue = NSLocalizedString("Distance Measurement", comment: "")
-
-        scaleTitleLabel.stringValue = NSLocalizedString("Scale:", comment: "")
-        lengthTitleLabel.stringValue = NSLocalizedString("Distance", comment: "") + ":"
-        precisionTitleLabel.stringValue = NSLocalizedString("Precision", comment: "") + ":"
-        angleTitleLabel.stringValue = NSLocalizedString("Angle", comment: "") + ":"
-        xTitleLabel.stringValue = NSLocalizedString("X", comment: "") + ":"
-        yTitleLabel.stringValue = NSLocalizedString("Y", comment: "") + ""
-        settingsButton.title = NSLocalizedString("Settings", comment: "")
+        titleLabel.stringValue = KMLocalizedString("Distance Measurement")
+       
+        lengthTitleLabel.stringValue = KMLocalizedString("Distance") + ":"
+        angleTitleLabel.stringValue = KMLocalizedString("Angle") + ":"
+        xTitleLabel.stringValue = KMLocalizedString("X") + ":"
+        yTitleLabel.stringValue = KMLocalizedString("Y") + ""
+        scaleTitleLabel.stringValue = KMLocalizedString("Scale:")
+        precisionTitleLabel.stringValue = KMLocalizedString("Precision") + ":"
     }
     
     func hideFloatingWindow() {
@@ -112,12 +126,5 @@ class CDistanceMeasureInfoWindowController: NSWindowController {
     }
     
     // MARK: Action
-    
-    @IBAction func buttonItemClick_Setting(_ sender: Any) {
-        delegate?.distanceMeasureInfoWindowControllerSetting(self)
-    }
-
-    @IBAction func buttonItemClick_Cancel(_ sender: Any) {
-        delegate?.cancelMeasureInfoWindowControllerSetting(self)
-    }
+     
 }

+ 80 - 156
PDF Office/PDF Master/Class/PDFTools/Measure/Window/CDistanceMeasureInfoWindowController.xib

@@ -10,14 +10,12 @@
             <connections>
                 <outlet property="angleLabel" destination="Gab-Do-JHB" id="VP9-HV-d0Z"/>
                 <outlet property="angleTitleLabel" destination="cj2-uv-leJ" id="ymh-rO-2YU"/>
-                <outlet property="cancelButton" destination="J3O-9a-Yf8" id="KNs-Dv-4N0"/>
                 <outlet property="lengthLabel" destination="pNQ-XS-zSa" id="Hav-iL-DcO"/>
                 <outlet property="lengthTitleLabel" destination="NiN-LM-nI2" id="4II-fQ-LC0"/>
                 <outlet property="precisionLabel" destination="L6K-WZ-ufU" id="8y0-un-1rR"/>
                 <outlet property="precisionTitleLabel" destination="xmh-zp-Pme" id="jZJ-oF-ZMW"/>
                 <outlet property="scaleLabel" destination="WGH-zp-MrF" id="Hnm-Kh-hg0"/>
                 <outlet property="scaleTitleLabel" destination="bkr-Me-ofi" id="Eg8-5M-cAQ"/>
-                <outlet property="settingsButton" destination="uof-N3-MWI" id="6JI-Mz-ORK"/>
                 <outlet property="titleLabel" destination="UR2-Nl-Rfq" id="Tbt-Ys-8Sh"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
                 <outlet property="xLabel" destination="yJ2-cI-hDJ" id="RSs-2Y-LBO"/>
@@ -28,191 +26,120 @@
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titlebarAppearsTransparent="YES" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
+        <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titlebarAppearsTransparent="YES" titleVisibility="hidden" id="F0z-JX-Cv5">
+            <windowStyleMask key="styleMask" titled="YES" fullSizeContentView="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="1704" y="727" width="300" height="280"/>
+            <rect key="contentRect" x="1704" y="727" width="240" height="172"/>
             <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
-            <view key="contentView" misplaced="YES" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="300" height="280"/>
+            <view key="contentView" id="se5-gp-TjO">
+                <rect key="frame" x="0.0" y="0.0" width="240" height="172"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MLG-e9-AAe">
-                        <rect key="frame" x="20" y="198" width="16" height="16"/>
-                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ImageNameToolbarMeasureLine" id="dJJ-Gm-hsW"/>
-                    </imageView>
+                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="UR2-Nl-Rfq">
+                        <rect key="frame" x="14" y="139" width="153" height="17"/>
+                        <textFieldCell key="cell" lineBreakMode="clipping" title="Distance Measurement" id="Mop-Hf-Nig">
+                            <font key="font" metaFont="system" size="14"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
                     <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="RmB-ov-qse">
-                        <rect key="frame" x="44" y="46" width="64" height="142"/>
+                        <rect key="frame" x="16" y="15" width="208" height="112"/>
                         <view key="contentView" id="LOt-xf-nzG">
-                            <rect key="frame" x="0.0" y="0.0" width="64" height="142"/>
+                            <rect key="frame" x="0.0" y="0.0" width="208" height="112"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bkr-Me-ofi">
-                                    <rect key="frame" x="-2" y="125" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Scale:" id="iJj-9Q-Srf">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NiN-LM-nI2">
+                                    <rect key="frame" x="-2" y="95" width="53" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Length:" id="wgl-yc-wVa">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NiN-LM-nI2">
-                                    <rect key="frame" x="-2" y="100" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Length:" id="wgl-yc-wVa">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pNQ-XS-zSa">
+                                    <rect key="frame" x="51" y="95" width="23" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0.1" id="3EM-lD-z9s">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xmh-zp-Pme">
-                                    <rect key="frame" x="-2" y="75" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Precision:" id="ndo-dd-Sac">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cj2-uv-leJ">
+                                    <rect key="frame" x="-2" y="70" width="45" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Angle:" id="BYg-dB-6N3">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cj2-uv-leJ">
-                                    <rect key="frame" x="-2" y="50" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Angle:" id="BYg-dB-6N3">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Gab-Do-JHB">
+                                    <rect key="frame" x="43" y="70" width="13" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="f4O-y0-pg7">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
                                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mPW-Bh-h0a">
-                                    <rect key="frame" x="-2" y="25" width="68" height="17"/>
+                                    <rect key="frame" x="-2" y="45" width="18" height="17"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="X:" id="K0d-sL-sc4">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vPQ-p5-Hhs">
-                                    <rect key="frame" x="-2" y="0.0" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Y:" id="P2y-Ro-HLT">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yJ2-cI-hDJ">
+                                    <rect key="frame" x="16" y="45" width="13" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="m55-YG-Oxk">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="trailing" secondItem="xmh-zp-Pme" secondAttribute="trailing" id="5us-NI-UCX"/>
-                                <constraint firstAttribute="bottom" secondItem="vPQ-p5-Hhs" secondAttribute="bottom" id="95F-CD-Zjf"/>
-                                <constraint firstAttribute="trailing" secondItem="mPW-Bh-h0a" secondAttribute="trailing" id="DSZ-cP-Fam"/>
-                                <constraint firstAttribute="trailing" secondItem="cj2-uv-leJ" secondAttribute="trailing" id="FE1-Q2-LQ8"/>
-                                <constraint firstItem="mPW-Bh-h0a" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="K8Z-C3-0Xu"/>
-                                <constraint firstItem="mPW-Bh-h0a" firstAttribute="top" secondItem="cj2-uv-leJ" secondAttribute="bottom" constant="8" id="Oow-KJ-Yt3"/>
-                                <constraint firstItem="vPQ-p5-Hhs" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="V7q-0s-MCa"/>
-                                <constraint firstItem="vPQ-p5-Hhs" firstAttribute="top" secondItem="mPW-Bh-h0a" secondAttribute="bottom" constant="8" id="VXQ-mO-7Lm"/>
-                                <constraint firstItem="NiN-LM-nI2" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="XNS-Fq-861"/>
-                                <constraint firstItem="bkr-Me-ofi" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="adV-yB-HHP"/>
-                                <constraint firstAttribute="trailing" secondItem="vPQ-p5-Hhs" secondAttribute="trailing" id="cef-ec-cCy"/>
-                                <constraint firstItem="cj2-uv-leJ" firstAttribute="top" secondItem="xmh-zp-Pme" secondAttribute="bottom" constant="8" id="igQ-dK-WX8"/>
-                                <constraint firstItem="cj2-uv-leJ" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="kiS-zX-6iA"/>
-                                <constraint firstItem="xmh-zp-Pme" firstAttribute="top" secondItem="NiN-LM-nI2" secondAttribute="bottom" constant="8" id="nKd-O7-NAh"/>
-                                <constraint firstAttribute="trailing" secondItem="NiN-LM-nI2" secondAttribute="trailing" id="nZk-Tq-bFZ"/>
-                                <constraint firstItem="bkr-Me-ofi" firstAttribute="top" secondItem="LOt-xf-nzG" secondAttribute="top" id="rJl-NP-Ivh"/>
-                                <constraint firstAttribute="trailing" secondItem="bkr-Me-ofi" secondAttribute="trailing" id="sU0-jM-son"/>
-                                <constraint firstItem="xmh-zp-Pme" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="v3e-3x-lqB"/>
-                                <constraint firstItem="NiN-LM-nI2" firstAttribute="top" secondItem="bkr-Me-ofi" secondAttribute="bottom" constant="8" id="v6e-Ph-nuE"/>
-                            </constraints>
-                        </view>
-                    </box>
-                    <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="UR2-Nl-Rfq">
-                        <rect key="frame" x="42" y="196" width="172" height="19"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="168" id="BRJ-8k-Oko"/>
-                            <constraint firstAttribute="height" constant="19" id="Xkg-W8-49N"/>
-                        </constraints>
-                        <textFieldCell key="cell" lineBreakMode="clipping" title="Distance Measurement" id="Mop-Hf-Nig">
-                            <font key="font" metaFont="system" size="14"/>
-                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uof-N3-MWI">
-                        <rect key="frame" x="205" y="10" width="80" height="16"/>
-                        <buttonCell key="cell" type="bevel" title="Setting" bezelStyle="rounded" alignment="center" controlSize="large" imageScaling="proportionallyDown" inset="2" id="N5u-eq-HZN">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="80" id="3lA-aK-x62"/>
-                        </constraints>
-                        <connections>
-                            <action selector="buttonItemClick_Setting:" target="-2" id="WWZ-MY-WpD"/>
-                        </connections>
-                    </button>
-                    <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="J3O-9a-Yf8">
-                        <rect key="frame" x="114" y="2" width="79" height="32"/>
-                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5Wc-fi-Tbr">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-Gw
-</string>
-                        </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="20" id="gDb-Bi-4Sv"/>
-                            <constraint firstAttribute="width" constant="67" id="jPC-Xb-gqp"/>
-                        </constraints>
-                        <connections>
-                            <action selector="buttonItemClick_Cancel:" target="-2" id="X3Y-FR-GUg"/>
-                        </connections>
-                    </button>
-                    <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="TAT-We-2IA">
-                        <rect key="frame" x="132" y="46" width="140" height="142"/>
-                        <view key="contentView" id="fdg-cy-dyo">
-                            <rect key="frame" x="0.0" y="0.0" width="140" height="142"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WGH-zp-MrF">
-                                    <rect key="frame" x="-2" y="125" width="144" height="17"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="140" id="Knt-mK-pgE"/>
-                                    </constraints>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="ofb-dJ-bxz">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vPQ-p5-Hhs">
+                                    <rect key="frame" x="41" y="45" width="17" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Y:" id="P2y-Ro-HLT">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pNQ-XS-zSa">
-                                    <rect key="frame" x="-2" y="100" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0.1" id="3EM-lD-z9s">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kUi-Hy-7fS">
+                                    <rect key="frame" x="58" y="45" width="13" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="63G-dc-pHe">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L6K-WZ-ufU">
-                                    <rect key="frame" x="-2" y="75" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0.1" id="Ypw-Vo-HDg">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bkr-Me-ofi">
+                                    <rect key="frame" x="-2" y="20" width="44" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Scale:" id="iJj-9Q-Srf">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Gab-Do-JHB">
-                                    <rect key="frame" x="-2" y="50" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="f4O-y0-pg7">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WGH-zp-MrF">
+                                    <rect key="frame" x="42" y="20" width="13" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="ofb-dJ-bxz">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yJ2-cI-hDJ">
-                                    <rect key="frame" x="-2" y="25" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="m55-YG-Oxk">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xmh-zp-Pme">
+                                    <rect key="frame" x="-2" y="-5" width="68" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Precision:" id="ndo-dd-Sac">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kUi-Hy-7fS">
-                                    <rect key="frame" x="-2" y="0.0" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0" id="63G-dc-pHe">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L6K-WZ-ufU">
+                                    <rect key="frame" x="66" y="-5" width="23" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="0.1" id="Ypw-Vo-HDg">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -220,43 +147,43 @@ Gw
                                 </textField>
                             </subviews>
                             <constraints>
-                                <constraint firstAttribute="trailing" secondItem="kUi-Hy-7fS" secondAttribute="trailing" id="2Jg-Mc-MTk"/>
-                                <constraint firstItem="L6K-WZ-ufU" firstAttribute="top" secondItem="pNQ-XS-zSa" secondAttribute="bottom" constant="8" id="2sT-95-6Xe"/>
-                                <constraint firstItem="WGH-zp-MrF" firstAttribute="top" secondItem="fdg-cy-dyo" secondAttribute="top" id="43b-7p-ctZ"/>
-                                <constraint firstItem="pNQ-XS-zSa" firstAttribute="leading" secondItem="fdg-cy-dyo" secondAttribute="leading" id="4Xg-TS-YMr"/>
-                                <constraint firstItem="WGH-zp-MrF" firstAttribute="leading" secondItem="fdg-cy-dyo" secondAttribute="leading" id="5OL-fl-LPt"/>
-                                <constraint firstAttribute="bottom" secondItem="kUi-Hy-7fS" secondAttribute="bottom" id="6tG-II-l3c"/>
-                                <constraint firstItem="Gab-Do-JHB" firstAttribute="leading" secondItem="fdg-cy-dyo" secondAttribute="leading" id="IEW-y9-M3i"/>
-                                <constraint firstAttribute="trailing" secondItem="pNQ-XS-zSa" secondAttribute="trailing" id="Pre-UE-4mk"/>
-                                <constraint firstAttribute="trailing" secondItem="WGH-zp-MrF" secondAttribute="trailing" id="TqR-f7-Rzz"/>
-                                <constraint firstItem="kUi-Hy-7fS" firstAttribute="top" secondItem="yJ2-cI-hDJ" secondAttribute="bottom" constant="8" id="ZJo-oC-zQe"/>
-                                <constraint firstAttribute="trailing" secondItem="yJ2-cI-hDJ" secondAttribute="trailing" id="aYM-eU-PUc"/>
-                                <constraint firstItem="L6K-WZ-ufU" firstAttribute="leading" secondItem="fdg-cy-dyo" secondAttribute="leading" id="b6n-FE-fjC"/>
-                                <constraint firstItem="yJ2-cI-hDJ" firstAttribute="leading" secondItem="fdg-cy-dyo" secondAttribute="leading" id="fqX-JZ-qRt"/>
-                                <constraint firstItem="yJ2-cI-hDJ" firstAttribute="top" secondItem="Gab-Do-JHB" secondAttribute="bottom" constant="8" id="lAW-OW-Km1"/>
-                                <constraint firstAttribute="trailing" secondItem="Gab-Do-JHB" secondAttribute="trailing" id="n9a-Ux-9xm"/>
-                                <constraint firstItem="pNQ-XS-zSa" firstAttribute="top" secondItem="WGH-zp-MrF" secondAttribute="bottom" constant="8" id="onV-Gt-H4p"/>
-                                <constraint firstItem="kUi-Hy-7fS" firstAttribute="leading" secondItem="fdg-cy-dyo" secondAttribute="leading" id="wJB-Rw-TPk"/>
-                                <constraint firstItem="Gab-Do-JHB" firstAttribute="top" secondItem="L6K-WZ-ufU" secondAttribute="bottom" constant="8" id="xSF-bs-GwQ"/>
-                                <constraint firstAttribute="trailing" secondItem="L6K-WZ-ufU" secondAttribute="trailing" id="xpg-bS-HS1"/>
+                                <constraint firstItem="pNQ-XS-zSa" firstAttribute="leading" secondItem="NiN-LM-nI2" secondAttribute="trailing" constant="4" id="0st-WB-doZ"/>
+                                <constraint firstItem="yJ2-cI-hDJ" firstAttribute="centerY" secondItem="mPW-Bh-h0a" secondAttribute="centerY" id="4bF-um-28g"/>
+                                <constraint firstItem="kUi-Hy-7fS" firstAttribute="leading" secondItem="vPQ-p5-Hhs" secondAttribute="trailing" constant="4" id="5En-qI-BPd"/>
+                                <constraint firstItem="mPW-Bh-h0a" firstAttribute="top" secondItem="cj2-uv-leJ" secondAttribute="bottom" constant="8" id="EJ6-D4-JEF"/>
+                                <constraint firstItem="xmh-zp-Pme" firstAttribute="top" secondItem="bkr-Me-ofi" secondAttribute="bottom" constant="8" id="H7p-mL-czd"/>
+                                <constraint firstItem="bkr-Me-ofi" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="NlP-ul-xVV"/>
+                                <constraint firstItem="NiN-LM-nI2" firstAttribute="top" secondItem="LOt-xf-nzG" secondAttribute="top" id="Oe5-Iy-Caf"/>
+                                <constraint firstItem="L6K-WZ-ufU" firstAttribute="leading" secondItem="xmh-zp-Pme" secondAttribute="trailing" constant="4" id="RBD-lE-whg"/>
+                                <constraint firstItem="cj2-uv-leJ" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="RzZ-DM-GQD"/>
+                                <constraint firstItem="yJ2-cI-hDJ" firstAttribute="leading" secondItem="mPW-Bh-h0a" secondAttribute="trailing" constant="4" id="T9T-bu-FL9"/>
+                                <constraint firstItem="WGH-zp-MrF" firstAttribute="centerY" secondItem="bkr-Me-ofi" secondAttribute="centerY" id="TrK-di-lAf"/>
+                                <constraint firstItem="L6K-WZ-ufU" firstAttribute="centerY" secondItem="xmh-zp-Pme" secondAttribute="centerY" id="csL-uL-rA7"/>
+                                <constraint firstItem="xmh-zp-Pme" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="dy3-Oi-WsO"/>
+                                <constraint firstItem="bkr-Me-ofi" firstAttribute="top" secondItem="mPW-Bh-h0a" secondAttribute="bottom" constant="8" id="eR1-k2-crY"/>
+                                <constraint firstItem="Gab-Do-JHB" firstAttribute="leading" secondItem="cj2-uv-leJ" secondAttribute="trailing" constant="4" id="hbC-Cs-2Ep"/>
+                                <constraint firstItem="pNQ-XS-zSa" firstAttribute="centerY" secondItem="NiN-LM-nI2" secondAttribute="centerY" id="jiw-9H-zhG"/>
+                                <constraint firstItem="cj2-uv-leJ" firstAttribute="top" secondItem="NiN-LM-nI2" secondAttribute="bottom" constant="8" id="n4d-aF-GBM"/>
+                                <constraint firstItem="vPQ-p5-Hhs" firstAttribute="leading" secondItem="yJ2-cI-hDJ" secondAttribute="trailing" constant="16" id="pFD-fY-K2L"/>
+                                <constraint firstItem="NiN-LM-nI2" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="rQy-1B-CqV"/>
+                                <constraint firstItem="vPQ-p5-Hhs" firstAttribute="centerY" secondItem="mPW-Bh-h0a" secondAttribute="centerY" id="tUP-6o-XNz"/>
+                                <constraint firstItem="WGH-zp-MrF" firstAttribute="leading" secondItem="bkr-Me-ofi" secondAttribute="trailing" constant="4" id="uPr-5W-YBz"/>
+                                <constraint firstItem="mPW-Bh-h0a" firstAttribute="leading" secondItem="LOt-xf-nzG" secondAttribute="leading" id="utp-iN-ldi"/>
+                                <constraint firstItem="kUi-Hy-7fS" firstAttribute="centerY" secondItem="vPQ-p5-Hhs" secondAttribute="centerY" id="vVD-a1-6dA"/>
+                                <constraint firstItem="Gab-Do-JHB" firstAttribute="centerY" secondItem="cj2-uv-leJ" secondAttribute="centerY" id="yGr-2m-nIP"/>
                             </constraints>
                         </view>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="208" id="VFk-l6-TR1"/>
+                            <constraint firstAttribute="height" constant="112" id="uNr-CB-ujw"/>
+                        </constraints>
                     </box>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="UR2-Nl-Rfq" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="-1" id="2u2-8v-0Br"/>
-                    <constraint firstItem="uof-N3-MWI" firstAttribute="centerY" secondItem="J3O-9a-Yf8" secondAttribute="centerY" id="6Iu-cM-e4A"/>
-                    <constraint firstItem="MLG-e9-AAe" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="Ccv-BI-nig"/>
-                    <constraint firstItem="TAT-We-2IA" firstAttribute="leading" secondItem="RmB-ov-qse" secondAttribute="trailing" constant="24" id="RQX-ue-JAA"/>
-                    <constraint firstItem="uof-N3-MWI" firstAttribute="leading" secondItem="J3O-9a-Yf8" secondAttribute="trailing" constant="18" id="Uu8-5k-M6L"/>
-                    <constraint firstAttribute="trailing" secondItem="uof-N3-MWI" secondAttribute="trailing" constant="15" id="fDm-s1-izZ"/>
-                    <constraint firstItem="RmB-ov-qse" firstAttribute="top" secondItem="UR2-Nl-Rfq" secondAttribute="bottom" constant="8" id="jtx-8D-eo5"/>
-                    <constraint firstItem="uof-N3-MWI" firstAttribute="top" secondItem="TAT-We-2IA" secondAttribute="bottom" constant="20" id="neL-lT-I4Y"/>
-                    <constraint firstAttribute="bottom" secondItem="uof-N3-MWI" secondAttribute="bottom" constant="10" id="o4l-eO-NEE"/>
-                    <constraint firstItem="UR2-Nl-Rfq" firstAttribute="centerY" secondItem="MLG-e9-AAe" secondAttribute="centerY" id="syL-Yw-Q7G"/>
+                    <constraint firstItem="UR2-Nl-Rfq" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="16" id="2u2-8v-0Br"/>
+                    <constraint firstItem="UR2-Nl-Rfq" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="16" id="jWo-Jy-WE5"/>
+                    <constraint firstItem="RmB-ov-qse" firstAttribute="top" secondItem="UR2-Nl-Rfq" secondAttribute="bottom" constant="12" id="jtx-8D-eo5"/>
                     <constraint firstItem="RmB-ov-qse" firstAttribute="leading" secondItem="UR2-Nl-Rfq" secondAttribute="leading" id="t4P-fZ-wrJ"/>
-                    <constraint firstItem="UR2-Nl-Rfq" firstAttribute="leading" secondItem="MLG-e9-AAe" secondAttribute="trailing" constant="8" id="w5N-B1-7WB"/>
-                    <constraint firstItem="TAT-We-2IA" firstAttribute="firstBaseline" secondItem="RmB-ov-qse" secondAttribute="firstBaseline" id="wMP-iw-48f"/>
                 </constraints>
             </view>
             <connections>
@@ -265,7 +192,4 @@ Gw
             <point key="canvasLocation" x="3" y="144"/>
         </window>
     </objects>
-    <resources>
-        <image name="ImageNameToolbarMeasureLine" width="16" height="16"/>
-    </resources>
 </document>

+ 22 - 4
PDF Office/PDF Master/Class/PDFTools/Measure/Window/CPerimeterMeasureInfoWindowController.swift

@@ -6,6 +6,7 @@
 //
 
 import Cocoa
+import KMComponentLibrary
 
 protocol CPerimeterMeasureInfoWindowControllerDelegate: AnyObject {
     func perimeterMeasureInfoWindowControllerSetting(_ perimeterMeasureInfoWindowController: CPerimeterMeasureInfoWindowController)
@@ -23,8 +24,7 @@ class CPerimeterMeasureInfoWindowController: NSWindowController {
     @IBOutlet weak var lengthLabel: NSTextField!
     @IBOutlet weak var precisionLabel: NSTextField!
     @IBOutlet weak var angleLabel: NSTextField!
-    @IBOutlet weak var settingsButton: NSButton!
-
+ 
     weak var delegate: CPerimeterMeasureInfoWindowControllerDelegate?
     var measureInfo: CPDFPerimeterMeasureInfo = CPDFPerimeterMeasureInfo()
     
@@ -38,6 +38,25 @@ class CPerimeterMeasureInfoWindowController: NSWindowController {
         self.window?.level = .floating
         commonInit()
         configurationLanguage()
+        
+        refreshUI()
+    }
+    
+    func refreshUI() {
+        titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
+        
+        for label in [lengthLabel, lengthTitleLabel, angleLabel, angleTitleLabel, scaleLabel, scaleTitleLabel, precisionLabel, precisionTitleLabel] as! [NSTextField] {
+            label.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-regular")
+        }
+        
+        for label in [lengthTitleLabel, angleTitleLabel, scaleTitleLabel, precisionTitleLabel] as! [NSTextField] {
+            label.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
+        }
+        
+        for label in [lengthLabel, angleLabel] as! [NSTextField] {
+            label.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorPrimary/text")
+        }
     }
     
     func hideFloatingWindow() {
@@ -51,8 +70,7 @@ class CPerimeterMeasureInfoWindowController: NSWindowController {
         lengthTitleLabel.stringValue = NSLocalizedString("Area", comment: "") + ":"
         precisionTitleLabel.stringValue = NSLocalizedString("Precision", comment: "") + ":"
         angleTitleLabel.stringValue = NSLocalizedString("Angle", comment: "") + ":"
-        settingsButton.title = NSLocalizedString("Settings", comment: "")
-    }
+     }
     
     private func commonInit() {
         scaleLabel.stringValue = String(format: "%0.0f %@ = %0.0f %@", measureInfo.rulerBase, measureInfo.rulerBaseUnit, measureInfo.rulerTranslate, measureInfo.rulerTranslateUnit)

+ 63 - 119
PDF Office/PDF Master/Class/PDFTools/Measure/Window/CPerimeterMeasureInfoWindowController.xib

@@ -16,7 +16,6 @@
                 <outlet property="precisionTitleLabel" destination="mx9-KK-QVJ" id="7VU-P7-Hnc"/>
                 <outlet property="scaleLabel" destination="wxE-i8-Oyh" id="mC6-ck-IxD"/>
                 <outlet property="scaleTitleLabel" destination="FkT-se-g48" id="zyd-b3-oPb"/>
-                <outlet property="settingsButton" destination="7fr-3C-l1g" id="vT9-0z-gVW"/>
                 <outlet property="titleLabel" destination="fuf-bl-vhH" id="RVi-0C-jd5"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
             </connections>
@@ -24,145 +23,87 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titlebarAppearsTransparent="YES" id="F0z-JX-Cv5">
-            <windowStyleMask key="styleMask" titled="YES"/>
+            <windowStyleMask key="styleMask" titled="YES" fullSizeContentView="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="1685" y="817" width="300" height="230"/>
+            <rect key="contentRect" x="1685" y="817" width="253" height="171"/>
             <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
             <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="300" height="162"/>
+                <rect key="frame" x="0.0" y="0.0" width="253" height="171"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="O2f-Vz-OLT">
-                        <rect key="frame" x="20" y="147" width="16" height="16"/>
-                        <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ImageNameToolbarPolyline" id="UoC-fH-pS8"/>
-                    </imageView>
                     <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fuf-bl-vhH">
-                        <rect key="frame" x="42" y="146" width="59" height="17"/>
+                        <rect key="frame" x="14" y="138" width="59" height="17"/>
                         <textFieldCell key="cell" lineBreakMode="clipping" title="Multiline" id="koO-KJ-80f">
                             <font key="font" metaFont="system" size="14"/>
                             <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7fr-3C-l1g">
-                        <rect key="frame" x="205" y="10" width="80" height="16"/>
-                        <buttonCell key="cell" type="bevel" title="Setting" bezelStyle="rounded" alignment="center" controlSize="large" imageScaling="proportionallyDown" inset="2" id="ygA-aI-XfY">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="80" id="t1P-Zp-tFW"/>
-                        </constraints>
-                        <connections>
-                            <action selector="buttonItemClick_Setting:" target="-2" id="hqK-Ww-vbZ"/>
-                        </connections>
-                    </button>
-                    <button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aSX-Nt-h63">
-                        <rect key="frame" x="117" y="8" width="80" height="20"/>
-                        <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="rounded" alignment="center" controlSize="large" imageScaling="proportionallyDown" inset="2" id="AQo-Cp-Fqj">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                            <string key="keyEquivalent" base64-UTF8="YES">
-Gw
-</string>
-                        </buttonCell>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="20" id="K9h-SK-6sK"/>
-                            <constraint firstAttribute="width" constant="80" id="ipO-Zw-sdb"/>
-                        </constraints>
-                    </button>
                     <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="MeN-Rv-0eZ">
-                        <rect key="frame" x="44" y="46" width="64" height="92"/>
+                        <rect key="frame" x="16" y="16" width="208" height="110"/>
                         <view key="contentView" id="Dge-PZ-2tp">
-                            <rect key="frame" x="0.0" y="0.0" width="64" height="92"/>
+                            <rect key="frame" x="0.0" y="0.0" width="208" height="110"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FkT-se-g48">
-                                    <rect key="frame" x="-2" y="75" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Scale:" id="rF7-b0-Ej4">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GMr-eD-dPe">
+                                    <rect key="frame" x="-2" y="93" width="53" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Length:" id="XhL-t1-Mz7">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GMr-eD-dPe">
-                                    <rect key="frame" x="-2" y="50" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Length:" id="XhL-t1-Mz7">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Esk-Mt-wGg">
+                                    <rect key="frame" x="51" y="93" width="11" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="1" id="7Gf-T2-JZL">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mx9-KK-QVJ">
-                                    <rect key="frame" x="-2" y="25" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Precision:" id="GIS-QW-AhI">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S8f-V0-Jcv">
+                                    <rect key="frame" x="-2" y="68" width="45" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Angle:" id="gpq-1T-4lV">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="S8f-V0-Jcv">
-                                    <rect key="frame" x="-2" y="0.0" width="68" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Angle:" id="gpq-1T-4lV">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gE6-un-ONi">
+                                    <rect key="frame" x="43" y="68" width="11" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="1" id="Xen-qB-g1F">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="trailing" secondItem="mx9-KK-QVJ" secondAttribute="trailing" id="01g-rT-aYR"/>
-                                <constraint firstItem="mx9-KK-QVJ" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="6T6-OB-Gjo"/>
-                                <constraint firstAttribute="trailing" secondItem="FkT-se-g48" secondAttribute="trailing" id="9oH-Zu-eEC"/>
-                                <constraint firstItem="FkT-se-g48" firstAttribute="top" secondItem="Dge-PZ-2tp" secondAttribute="top" id="CWj-A7-Gkv"/>
-                                <constraint firstAttribute="bottom" secondItem="S8f-V0-Jcv" secondAttribute="bottom" id="HXC-gP-Bnx"/>
-                                <constraint firstItem="mx9-KK-QVJ" firstAttribute="top" secondItem="GMr-eD-dPe" secondAttribute="bottom" constant="8" id="KAB-Cb-psi"/>
-                                <constraint firstAttribute="trailing" secondItem="S8f-V0-Jcv" secondAttribute="trailing" id="O0E-Km-wKa"/>
-                                <constraint firstItem="GMr-eD-dPe" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="S76-6I-Rc8"/>
-                                <constraint firstItem="S8f-V0-Jcv" firstAttribute="top" secondItem="mx9-KK-QVJ" secondAttribute="bottom" constant="8" id="Vtm-z0-TFC"/>
-                                <constraint firstAttribute="trailing" secondItem="GMr-eD-dPe" secondAttribute="trailing" id="YXP-iE-dci"/>
-                                <constraint firstItem="FkT-se-g48" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="lCf-cs-R49"/>
-                                <constraint firstItem="GMr-eD-dPe" firstAttribute="top" secondItem="FkT-se-g48" secondAttribute="bottom" constant="8" id="miv-LT-u7E"/>
-                                <constraint firstItem="S8f-V0-Jcv" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="wYW-nO-SQw"/>
-                            </constraints>
-                        </view>
-                    </box>
-                    <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Hho-f8-UQC">
-                        <rect key="frame" x="132" y="46" width="140" height="92"/>
-                        <view key="contentView" id="2oO-aN-1RW">
-                            <rect key="frame" x="0.0" y="0.0" width="140" height="92"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wxE-i8-Oyh">
-                                    <rect key="frame" x="-2" y="75" width="144" height="17"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="140" id="87p-mo-f5P"/>
-                                    </constraints>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="1 cm = 1 cm" id="aNN-w5-GMR">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FkT-se-g48">
+                                    <rect key="frame" x="-2" y="43" width="44" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Scale:" id="rF7-b0-Ej4">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Esk-Mt-wGg">
-                                    <rect key="frame" x="-2" y="50" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" id="7Gf-T2-JZL">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wxE-i8-Oyh">
+                                    <rect key="frame" x="42" y="43" width="80" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="1 cm = 1 cm" id="aNN-w5-GMR">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D8T-iy-XgH">
-                                    <rect key="frame" x="-2" y="25" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" id="oo2-8Q-8Lg">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mx9-KK-QVJ">
+                                    <rect key="frame" x="-2" y="18" width="68" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Precision:" id="GIS-QW-AhI">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gE6-un-ONi">
-                                    <rect key="frame" x="-2" y="0.0" width="144" height="17"/>
-                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" id="Xen-qB-g1F">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D8T-iy-XgH">
+                                    <rect key="frame" x="66" y="18" width="11" height="17"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="left" title="1" id="oo2-8Q-8Lg">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -170,46 +111,49 @@ Gw
                                 </textField>
                             </subviews>
                             <constraints>
-                                <constraint firstItem="gE6-un-ONi" firstAttribute="leading" secondItem="2oO-aN-1RW" secondAttribute="leading" id="0O6-S9-Zeu"/>
-                                <constraint firstAttribute="trailing" secondItem="D8T-iy-XgH" secondAttribute="trailing" id="0zp-cm-uaO"/>
-                                <constraint firstAttribute="trailing" secondItem="gE6-un-ONi" secondAttribute="trailing" id="AdF-pM-t79"/>
-                                <constraint firstItem="Esk-Mt-wGg" firstAttribute="top" secondItem="wxE-i8-Oyh" secondAttribute="bottom" constant="8" id="GRq-Bp-SIH"/>
-                                <constraint firstItem="gE6-un-ONi" firstAttribute="top" secondItem="D8T-iy-XgH" secondAttribute="bottom" constant="8" id="GWy-ZF-7RA"/>
-                                <constraint firstAttribute="trailing" secondItem="wxE-i8-Oyh" secondAttribute="trailing" id="LnY-mB-YIp"/>
-                                <constraint firstItem="wxE-i8-Oyh" firstAttribute="leading" secondItem="2oO-aN-1RW" secondAttribute="leading" id="MtU-UG-aOm"/>
-                                <constraint firstItem="wxE-i8-Oyh" firstAttribute="top" secondItem="2oO-aN-1RW" secondAttribute="top" id="PsY-7y-3mk"/>
-                                <constraint firstItem="D8T-iy-XgH" firstAttribute="top" secondItem="Esk-Mt-wGg" secondAttribute="bottom" constant="8" id="SgO-Du-jof"/>
-                                <constraint firstAttribute="bottom" secondItem="gE6-un-ONi" secondAttribute="bottom" id="U00-NO-XU7"/>
-                                <constraint firstAttribute="trailing" secondItem="Esk-Mt-wGg" secondAttribute="trailing" id="bZx-sW-wai"/>
-                                <constraint firstItem="Esk-Mt-wGg" firstAttribute="leading" secondItem="2oO-aN-1RW" secondAttribute="leading" id="fJe-9v-JtT"/>
-                                <constraint firstItem="D8T-iy-XgH" firstAttribute="leading" secondItem="2oO-aN-1RW" secondAttribute="leading" id="mfF-as-RKO"/>
+                                <constraint firstItem="mx9-KK-QVJ" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="1h7-gh-Eh4"/>
+                                <constraint firstItem="gE6-un-ONi" firstAttribute="leading" secondItem="S8f-V0-Jcv" secondAttribute="trailing" constant="4" id="2b9-lw-uO5"/>
+                                <constraint firstItem="wxE-i8-Oyh" firstAttribute="leading" secondItem="FkT-se-g48" secondAttribute="trailing" constant="4" id="2ms-qO-2QC"/>
+                                <constraint firstItem="D8T-iy-XgH" firstAttribute="leading" secondItem="mx9-KK-QVJ" secondAttribute="trailing" constant="4" id="5Bt-5h-S3Q"/>
+                                <constraint firstItem="gE6-un-ONi" firstAttribute="centerY" secondItem="S8f-V0-Jcv" secondAttribute="centerY" id="5yE-MB-Fdp"/>
+                                <constraint firstItem="GMr-eD-dPe" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="Agq-H7-Dlz"/>
+                                <constraint firstItem="mx9-KK-QVJ" firstAttribute="top" secondItem="FkT-se-g48" secondAttribute="bottom" constant="8" id="G8k-sx-njO"/>
+                                <constraint firstItem="FkT-se-g48" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="MUV-EX-Qfg"/>
+                                <constraint firstItem="Esk-Mt-wGg" firstAttribute="centerY" secondItem="GMr-eD-dPe" secondAttribute="centerY" id="NzT-tt-tK7"/>
+                                <constraint firstItem="S8f-V0-Jcv" firstAttribute="leading" secondItem="Dge-PZ-2tp" secondAttribute="leading" id="OPA-DL-p1c"/>
+                                <constraint firstItem="GMr-eD-dPe" firstAttribute="top" secondItem="Dge-PZ-2tp" secondAttribute="top" id="PIw-cK-w0p"/>
+                                <constraint firstItem="FkT-se-g48" firstAttribute="centerY" secondItem="wxE-i8-Oyh" secondAttribute="centerY" id="Qhr-Mi-Orh"/>
+                                <constraint firstItem="Esk-Mt-wGg" firstAttribute="leading" secondItem="GMr-eD-dPe" secondAttribute="trailing" constant="4" id="SKz-JR-O7p"/>
+                                <constraint firstItem="S8f-V0-Jcv" firstAttribute="top" secondItem="GMr-eD-dPe" secondAttribute="bottom" constant="8" id="ek3-hO-GNp"/>
+                                <constraint firstItem="mx9-KK-QVJ" firstAttribute="centerY" secondItem="D8T-iy-XgH" secondAttribute="centerY" id="ht4-Fz-G2d"/>
+                                <constraint firstItem="FkT-se-g48" firstAttribute="top" secondItem="S8f-V0-Jcv" secondAttribute="bottom" constant="8" id="iTz-AD-akU"/>
                             </constraints>
                         </view>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="208" id="icH-b0-kpp"/>
+                        </constraints>
+                    </box>
+                    <box fixedFrame="YES" boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Hho-f8-UQC">
+                        <rect key="frame" x="104" y="38" width="140" height="92"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <view key="contentView" id="2oO-aN-1RW">
+                            <rect key="frame" x="0.0" y="0.0" width="140" height="92"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        </view>
                     </box>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="fuf-bl-vhH" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="-1" id="2Yq-bn-BVJ"/>
-                    <constraint firstItem="O2f-Vz-OLT" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="54M-p4-RYn"/>
-                    <constraint firstAttribute="bottom" secondItem="7fr-3C-l1g" secondAttribute="bottom" constant="10" id="9oK-CS-JGs"/>
-                    <constraint firstItem="Hho-f8-UQC" firstAttribute="top" secondItem="MeN-Rv-0eZ" secondAttribute="top" id="D67-g4-KQ9"/>
-                    <constraint firstItem="7fr-3C-l1g" firstAttribute="centerY" secondItem="aSX-Nt-h63" secondAttribute="centerY" id="RGr-8k-ahf"/>
-                    <constraint firstItem="7fr-3C-l1g" firstAttribute="leading" secondItem="aSX-Nt-h63" secondAttribute="trailing" constant="8" id="TiS-xD-6u8"/>
-                    <constraint firstItem="7fr-3C-l1g" firstAttribute="top" secondItem="Hho-f8-UQC" secondAttribute="bottom" constant="20" id="dlA-pU-i3f"/>
-                    <constraint firstItem="fuf-bl-vhH" firstAttribute="leading" secondItem="O2f-Vz-OLT" secondAttribute="trailing" constant="8" id="f7Q-Bc-txQ"/>
-                    <constraint firstItem="MeN-Rv-0eZ" firstAttribute="leading" secondItem="fuf-bl-vhH" secondAttribute="leading" id="kk5-yt-GPV"/>
-                    <constraint firstAttribute="trailing" secondItem="7fr-3C-l1g" secondAttribute="trailing" constant="15" id="ngH-QW-d7Q"/>
-                    <constraint firstItem="fuf-bl-vhH" firstAttribute="centerY" secondItem="O2f-Vz-OLT" secondAttribute="centerY" id="oeD-7C-8fq"/>
-                    <constraint firstItem="MeN-Rv-0eZ" firstAttribute="top" secondItem="fuf-bl-vhH" secondAttribute="bottom" constant="8" id="yVC-cu-Kbo"/>
-                    <constraint firstItem="Hho-f8-UQC" firstAttribute="leading" secondItem="MeN-Rv-0eZ" secondAttribute="trailing" constant="24" id="zhH-cS-bEl"/>
+                    <constraint firstItem="fuf-bl-vhH" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="16" id="43d-jJ-Tt1"/>
+                    <constraint firstAttribute="bottom" secondItem="MeN-Rv-0eZ" secondAttribute="bottom" constant="16" id="FnM-Sw-AMh"/>
+                    <constraint firstItem="MeN-Rv-0eZ" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="16" id="YKR-Sx-Fj3"/>
+                    <constraint firstItem="MeN-Rv-0eZ" firstAttribute="top" secondItem="fuf-bl-vhH" secondAttribute="bottom" constant="12" id="de0-Bt-d0K"/>
+                    <constraint firstItem="fuf-bl-vhH" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="16" id="pOa-7W-3ky"/>
                 </constraints>
             </view>
             <connections>
                 <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
             </connections>
-            <point key="canvasLocation" x="-28" y="144"/>
+            <point key="canvasLocation" x="-21.5" y="114.5"/>
         </window>
     </objects>
-    <resources>
-        <image name="ImageNameToolbarPolyline" width="16" height="16"/>
-    </resources>
 </document>

+ 80 - 70
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -497,6 +497,8 @@ struct KMNMWCFlags {
                 listView.annotationType = .line
             } else if subToolMode == .Measure {
                 listView.annotationType = CPDFMeasureDefaultInfo.default_measureType()
+                
+                refreshMeasureInfo()
             } else if subToolMode == .Stamp {
                 listView.annotationType = .stamp
             } else if subToolMode == .Sign {
@@ -1576,41 +1578,7 @@ struct KMNMWCFlags {
              
         }
     }
-    
-    //MARK: - 测量
-    @objc func cancelMeasureType() {
-        self.hideMeasureFloatingWindows()
-        
-    }
-    
-    func hideMeasureFloatingWindows() {
-        if distanceMeasureInfoWindowController?.window?.isVisible == true {
-            distanceMeasureInfoWindowController?.hideFloatingWindow()
-        } else if perimeterMeasureInfoWindowController?.window?.isVisible == true {
-            perimeterMeasureInfoWindowController?.hideFloatingWindow()
-        } else if areaMeasureInfoWindowController?.window?.isVisible == true {
-            areaMeasureInfoWindowController?.hideFloatingWindow()
-        }
-    }
-    
-    func showMeasureFloatingWindowsIfNeed() {
-        let toolMode = self.listView.toolMode
-        if toolMode != .CNoteToolMode {
-            return
-        }
-        let type = self.listView.annotationType
-        if type == .measureLine {
-            self.distanceMeasureInfoWindowController?.window?.orderFront(nil)
-        } else if type == .measurePolyLine {
-            self.perimeterMeasureInfoWindowController?.window?.orderFront(nil)
-        } else if type == .measurePolyGon {
-            self.areaMeasureInfoWindowController?.window?.orderFront(nil)
-        } else if type == .measureSquare {
-            self.areaMeasureInfoWindowController?.window?.orderFront(nil)
-        }
-    }
-    
-    
+   
     //MARK: - Watermark水印
     func showWatermarkController() {
         viewManager.editType = .watermark
@@ -3170,39 +3138,80 @@ struct KMNMWCFlags {
     
     //MARK: - 测量
     func refreshMeasureInfo() {
+        if distanceMeasureInfoWindowController == nil {
+            let measureInfo = CPDFDistanceMeasureInfo()
+            distanceMeasureInfoWindowController = CDistanceMeasureInfoWindowController()
+            distanceMeasureInfoWindowController?.delegate = self
+            distanceMeasureInfoWindowController?.measureInfo = measureInfo
+        }
+        
+        if perimeterMeasureInfoWindowController == nil {
+            let measureInfo = CPDFPerimeterMeasureInfo()
+            perimeterMeasureInfoWindowController = CPerimeterMeasureInfoWindowController()
+            perimeterMeasureInfoWindowController?.delegate = self
+            perimeterMeasureInfoWindowController?.measureInfo = measureInfo
+        }
+        
+        if areaMeasureInfoWindowController == nil {
+            let measureInfo = CPDFAreaMeasureInfo()
+            areaMeasureInfoWindowController = CAreaMeasureInfoWindowController()
+            areaMeasureInfoWindowController?.delegate = self
+            areaMeasureInfoWindowController?.measureInfo = measureInfo
+        }
+        
         if let annotation = listView.activeAnnotation {
             if (listView.activeAnnotation.isKind(of: CPDFLineAnnotation.self)) {
                 if (!(listView.activeAnnotation as! CPDFLineAnnotation).isMeasure) {
                     cancelMeasureType()
                 } else {
-                    if distanceMeasureInfoWindowController == nil {
-                        let measureInfo = CPDFDistanceMeasureInfo()
-                        distanceMeasureInfoWindowController = CDistanceMeasureInfoWindowController()
-                        distanceMeasureInfoWindowController?.measureInfo = measureInfo
-                        distanceMeasureInfoWindowController?.delegate = self
-                    }
+                    
                 }
             } else if (!listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) && !listView.activeAnnotation.isKind(of: CPDFPolylineAnnotation.self)) {
                 cancelMeasureType()
             } else if (listView.activeAnnotation.isKind(of: CPDFPolygonAnnotation.self) || listView.activeAnnotation.isKind(of: CPDFPolylineAnnotation.self)) {
-                if perimeterMeasureInfoWindowController == nil {
-                    let measureInfo = CPDFPerimeterMeasureInfo()
-                    perimeterMeasureInfoWindowController = CPerimeterMeasureInfoWindowController()
-                    perimeterMeasureInfoWindowController?.measureInfo = measureInfo
-                    perimeterMeasureInfoWindowController?.delegate = self
-                }
-                if areaMeasureInfoWindowController == nil {
-                    let measureInfo = CPDFAreaMeasureInfo()
-                    areaMeasureInfoWindowController = CAreaMeasureInfoWindowController()
-                    areaMeasureInfoWindowController?.measureInfo = measureInfo
-                    areaMeasureInfoWindowController?.delegate = self
-                }
+               
             }
         } else {
-            cancelMeasureType()
+            showMeasureFloatingWindowsIfNeed()
         }
     }
     
+    @objc func cancelMeasureType() {
+        self.hideMeasureFloatingWindows()
+        
+    }
+    
+    func hideMeasureFloatingWindows() {
+        if distanceMeasureInfoWindowController?.window?.isVisible == true {
+            distanceMeasureInfoWindowController?.hideFloatingWindow()
+        } else if perimeterMeasureInfoWindowController?.window?.isVisible == true {
+            perimeterMeasureInfoWindowController?.hideFloatingWindow()
+        } else if areaMeasureInfoWindowController?.window?.isVisible == true {
+            areaMeasureInfoWindowController?.hideFloatingWindow()
+        }
+    }
+    
+    func showMeasureFloatingWindowsIfNeed() {
+        cancelMeasureType()
+        
+        let toolMode = self.listView.toolMode
+        if toolMode != .CNoteToolMode {
+            return
+        }
+        
+        let type = self.listView.annotationType
+        if type == .measureLine {
+            self.distanceMeasureInfoWindowController?.window?.orderFront(nil)
+        } else if type == .measurePolyLine {
+            self.perimeterMeasureInfoWindowController?.window?.orderFront(nil)
+        } else if type == .measurePolyGon {
+            self.areaMeasureInfoWindowController?.window?.orderFront(nil)
+        } else if type == .measureSquare {
+            self.areaMeasureInfoWindowController?.window?.orderFront(nil)
+        } else {
+            cancelMeasureType()
+        }
+    }
 }
 
 //MARK: Compress
@@ -4910,6 +4919,17 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         reloadPopUIWindow()
     }
     
+    func pdfListViewChangedAnnotationType(_ pdfListView: CPDFListView!, for annotationType: CAnnotationType) {
+        if(annotationType == .unkown) {
+            toggleCloseRightSide()
+        } else if annotationType == .measureLine ||
+                    annotationType == .measurePolyLine ||
+                    annotationType == .measurePolyGon ||
+                    annotationType == .measureSquare {
+           refreshMeasureInfo()
+        }
+    }
+    
     func pdfListViewChangeatioActiveAnnotations(_ pdfListView: CPDFListView!, forActiveAnnotations annotations: [CPDFAnnotation]!, isRightMenu: Bool) {
         self.view.window?.makeFirstResponder(self.listView)
         
@@ -5426,12 +5446,6 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         reloadPopUIWindow()
     }
     
-    func pdfListViewChangedAnnotationType(_ pdfListView: CPDFListView!, for annotationType: CAnnotationType) {
-        if(annotationType == .unkown) {
-            toggleCloseRightSide()
-        }
-    }
-    
     func pdfListViewAddAnnotations(_ pdfListView: CPDFListView!, forAdd annotations: [CPDFAnnotation]!, in pdfPage: CPDFPage!) {
         
         var pageIndexes = IndexSet()
@@ -5553,7 +5567,8 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         }
         return true
     }
-    
+     
+    //MARK: -Measure
     func pdfListViewAnnotationMeasureInfoChange(_ pdfListView: CPDFListView!, with annotation: CPDFAnnotation!) {
         guard let data = annotation else {
             if distanceMeasureInfoWindowController?.window?.isVisible == true {
@@ -5573,9 +5588,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
     func pdfListViewMeasureCancel(_ pdfListView: CPDFListView!) {
         cancelMeasureType()
     }
-    
-    
-    
+     
     private func handleLineAnnotation(_ annotation: CPDFLineAnnotation) {
         if perimeterMeasureInfoWindowController?.window?.isVisible == true {
             perimeterMeasureInfoWindowController?.hideFloatingWindow()
@@ -5661,8 +5674,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
         
         return acos(dotProduct / (magnitude1 * magnitude2)) * (180.0 / .pi)
     }
-    
-    
+     
     @objc func pdfUpdatedFinish() {
         splitPDFController?.inPDFFirst = false
         splitPDFController?.outPDFFirst = false
@@ -6348,6 +6360,7 @@ extension KMMainViewController: CPDFDocumentDelegate {
     }
 }
 
+//MARK: - 测量代理
 
 // MARK: CDistanceMeasureInfoWindowControllerDelegate
 
@@ -6358,10 +6371,6 @@ extension KMMainViewController : CDistanceMeasureInfoWindowControllerDelegate {
         distanceSettingWC.delegate = self
         distanceSettingWC.startModal("")
     }
-    
-    func cancelMeasureInfoWindowControllerSetting(_ distanceMeasureInfoWindowController: CDistanceMeasureInfoWindowController) {
-        
-    }
 }
 
 // MARK: CPerimeterMeasureInfoWindowControllerDelegate
@@ -6492,6 +6501,7 @@ extension KMMainViewController : CAreaSettingWindowControllerDelegate {
     }
 }
 
+//MARK: - extension
 extension KMMainViewController {
     
     internal func removeNotifications() {

+ 2 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/KMRightSideController.swift

@@ -441,6 +441,7 @@ class KMRightSideController: NSViewController {
                         measure_Controller = KMMeasureController.init()
                     }
                     measure_Controller?.pdfView = self.pdfView
+                    measure_Controller?.viewManager = self.viewManager
                     contentViewController = measure_Controller
                 } else {
                     if line_Controller == nil {
@@ -505,6 +506,7 @@ class KMRightSideController: NSViewController {
                     measure_Controller = KMMeasureController.init()
                 }
                 measure_Controller?.pdfView = self.pdfView
+                measure_Controller?.viewManager = self.viewManager
                 
                 contentViewController = measure_Controller
             } else if subToolMode == .Tool_OCR {

+ 11 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Measure/KMMeasureController.swift

@@ -12,6 +12,8 @@ class KMMeasureController: NSViewController {
     
     @IBOutlet var typeSegmented: ComponentSegmented!
     
+    @IBOutlet var infoBGView: NSView!
+    @IBOutlet var infoTopConst: NSLayoutConstraint!
     //Color
     @IBOutlet var colorBGView: NSView!
     @IBOutlet var colorLabel: NSTextField!
@@ -67,6 +69,7 @@ class KMMeasureController: NSViewController {
     var annotationType: CAnnotationType = .measureLine
     
     var pdfView: CPDFListView?
+    var viewManager: KMPDFViewManager?
     
     //MARK: - func
     override func viewDidAppear() {
@@ -293,6 +296,14 @@ class KMMeasureController: NSViewController {
             firstAnnotation = annotations.first
         }
         
+        if viewManager?.subToolMode == .Measure {
+            infoTopConst.constant = 56
+            typeSegmented.isHidden = false
+        } else {
+            infoTopConst.constant = 0
+            typeSegmented.isHidden = true
+        }
+        
         line_Property.active = false
         multiLine_Property.active = false
         polygon_Property.active = false

+ 3 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Measure/KMMeasureController.xib

@@ -28,6 +28,8 @@
                 <outlet property="fontNameSelect" destination="k1s-Vp-Z2Q" id="vfw-VQ-yqw"/>
                 <outlet property="fontSizeSelect" destination="2Pt-Pj-O42" id="5xs-w1-Aby"/>
                 <outlet property="fontStyleSelect" destination="3wR-it-IKE" id="4zM-G3-qV3"/>
+                <outlet property="infoBGView" destination="jwj-lF-liJ" id="Uwr-h0-PxF"/>
+                <outlet property="infoTopConst" destination="Mzh-z8-HOs" id="aJ2-L6-FDE"/>
                 <outlet property="lineBGView" destination="Otd-Pu-5LY" id="Mp0-B1-Q2b"/>
                 <outlet property="lineBGViewHeightConst" destination="0SQ-UK-jpM" id="xRd-v7-8Hx"/>
                 <outlet property="lineDashSelect" destination="gYc-MU-gjA" id="NaF-hs-zMW"/>
@@ -476,12 +478,12 @@
                     </subviews>
                     <constraints>
                         <constraint firstAttribute="bottom" secondItem="jwj-lF-liJ" secondAttribute="bottom" id="DgQ-2d-Hi6"/>
+                        <constraint firstItem="jwj-lF-liJ" firstAttribute="top" secondItem="NsC-1g-lby" secondAttribute="top" constant="56" id="Mzh-z8-HOs"/>
                         <constraint firstItem="mlm-vW-E4I" firstAttribute="leading" secondItem="NsC-1g-lby" secondAttribute="leading" id="TTI-ZX-x1e"/>
                         <constraint firstItem="jwj-lF-liJ" firstAttribute="leading" secondItem="NsC-1g-lby" secondAttribute="leading" id="bLq-9g-L9h"/>
                         <constraint firstAttribute="trailing" secondItem="mlm-vW-E4I" secondAttribute="trailing" id="cUY-J6-Zi1"/>
                         <constraint firstAttribute="trailing" secondItem="jwj-lF-liJ" secondAttribute="trailing" id="haM-bs-bFF"/>
                         <constraint firstItem="mlm-vW-E4I" firstAttribute="top" secondItem="NsC-1g-lby" secondAttribute="top" id="iVM-bX-fUb"/>
-                        <constraint firstItem="jwj-lF-liJ" firstAttribute="top" secondItem="mlm-vW-E4I" secondAttribute="bottom" id="oqE-dg-NtA"/>
                     </constraints>
                 </customView>
             </subviews>