Browse Source

【BOTA】标签esc取消选中

lizhe 2 years ago
parent
commit
e5156f34b0

+ 5 - 0
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/BookMarks/KMBookMarkViewController.swift

@@ -136,6 +136,11 @@ class KMBookMarkViewController: NSViewController, NSTextFieldDelegate,NSMenuItem
         }
     }
     
+    
+    @IBAction func escButtonAction(_ sender: Any) {
+        self.bookTableView.deselectAll(nil)
+    }
+    
     @IBAction func addBookmarkAction(_ sender: Any) {
         
         

+ 26 - 11
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/BookMarks/KMBookMarkViewController.xib

@@ -29,10 +29,10 @@
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     <subviews>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="ZOC-6Y-3av">
-                            <rect key="frame" x="0.0" y="0.0" width="260" height="434"/>
+                            <rect key="frame" x="0.0" y="0.0" width="260" height="428"/>
                             <subviews>
                                 <view translatesAutoresizingMaskIntoConstraints="NO" id="bIK-U7-Zqf">
-                                    <rect key="frame" x="0.0" y="386" width="260" height="48"/>
+                                    <rect key="frame" x="0.0" y="380" width="260" height="48"/>
                                     <subviews>
                                         <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3oi-0L-gXH">
                                             <rect key="frame" x="14" y="16" width="35" height="16"/>
@@ -60,12 +60,27 @@
                                             <rect key="frame" x="0.0" y="0.0" width="260" height="1"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                         </customView>
+                                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bsc-ME-Qqh">
+                                            <rect key="frame" x="130" y="24" width="0.0" height="0.0"/>
+                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="Zio-I4-Bjd">
+                                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                <font key="font" metaFont="system"/>
+                                                <string key="keyEquivalent" base64-UTF8="YES">
+Gw
+</string>
+                                            </buttonCell>
+                                            <connections>
+                                                <action selector="escButtonAction:" target="-2" id="2IE-Dn-73t"/>
+                                            </connections>
+                                        </button>
                                     </subviews>
                                     <constraints>
                                         <constraint firstItem="3oi-0L-gXH" firstAttribute="centerY" secondItem="bIK-U7-Zqf" secondAttribute="centerY" id="Dx4-hO-Mw9"/>
+                                        <constraint firstItem="Bsc-ME-Qqh" firstAttribute="centerX" secondItem="bIK-U7-Zqf" secondAttribute="centerX" id="MB5-w1-b95"/>
                                         <constraint firstAttribute="trailing" secondItem="3yQ-un-hNE" secondAttribute="trailing" constant="8" id="SeY-1V-RIE"/>
                                         <constraint firstAttribute="height" constant="48" id="VqR-5n-kaA"/>
                                         <constraint firstItem="3oi-0L-gXH" firstAttribute="leading" secondItem="bIK-U7-Zqf" secondAttribute="leading" constant="16" id="Zaz-F0-rX0"/>
+                                        <constraint firstItem="Bsc-ME-Qqh" firstAttribute="centerY" secondItem="bIK-U7-Zqf" secondAttribute="centerY" id="b5q-EM-BXf"/>
                                         <constraint firstItem="3yQ-un-hNE" firstAttribute="centerY" secondItem="bIK-U7-Zqf" secondAttribute="centerY" id="kXJ-wD-hOY"/>
                                     </constraints>
                                 </view>
@@ -77,20 +92,20 @@
                             </constraints>
                         </customView>
                         <box borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="QXl-f3-0nT">
-                            <rect key="frame" x="0.0" y="0.0" width="260" height="386"/>
+                            <rect key="frame" x="0.0" y="0.0" width="260" height="380"/>
                             <view key="contentView" id="5Km-Gq-7Y6">
-                                <rect key="frame" x="0.0" y="0.0" width="260" height="386"/>
+                                <rect key="frame" x="0.0" y="0.0" width="260" height="380"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
                                     <scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="35" horizontalPageScroll="10" verticalLineScroll="35" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P2v-Ak-LWO">
-                                        <rect key="frame" x="0.0" y="2" width="260" height="384"/>
+                                        <rect key="frame" x="0.0" y="2" width="260" height="378"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <clipView key="contentView" drawsBackground="NO" id="KFG-R9-2uc">
-                                            <rect key="frame" x="0.0" y="0.0" width="260" height="384"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="260" height="378"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             <subviews>
                                                 <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" multipleSelection="NO" autosaveColumns="NO" rowHeight="35" rowSizeStyle="automatic" viewBased="YES" id="jMm-Al-ZqF">
-                                                    <rect key="frame" x="0.0" y="0.0" width="260" height="384"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="260" height="378"/>
                                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                     <size key="intercellSpacing" width="17" height="0.0"/>
                                                     <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
@@ -176,14 +191,14 @@
                             </view>
                         </box>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="H5X-YQ-dvn">
-                            <rect key="frame" x="0.0" y="0.0" width="260" height="386"/>
+                            <rect key="frame" x="0.0" y="0.0" width="260" height="380"/>
                             <subviews>
                                 <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8R5-DW-bXb">
-                                    <rect key="frame" x="64" y="107" width="132" height="128"/>
+                                    <rect key="frame" x="64" y="101" width="132" height="128"/>
                                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="KMImageNameBookMarkEmpty" id="6Kl-9F-c8Y"/>
                                 </imageView>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BO0-hw-zv2">
-                                    <rect key="frame" x="62" y="77" width="136" height="17"/>
+                                    <rect key="frame" x="62" y="71" width="136" height="17"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="No bookmark found" id="6Wq-yY-yuD">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -191,7 +206,7 @@
                                     </textFieldCell>
                                 </textField>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Msu-u0-gPn">
-                                    <rect key="frame" x="33" y="62" width="194" height="15"/>
+                                    <rect key="frame" x="33" y="56" width="194" height="15"/>
                                     <textFieldCell key="cell" alignment="center" id="bpF-T2-SUC">
                                         <font key="font" metaFont="cellTitle"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>