瀏覽代碼

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

wanjun 2 年之前
父節點
當前提交
d269c9d9b1

+ 15 - 3
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/BookMarks/KMBookMarkViewController.swift

@@ -48,17 +48,29 @@ class KMBookMarkViewController: NSViewController, NSTextFieldDelegate,NSMenuItem
 //        self.bookTableView.selectionHighlightStyle = NSTableView.SelectionHighlightStyle.none;
         
         self.titleTextField.stringValue = NSLocalizedString("Bookmarks", comment: "")
-        self.bigTipLabel.stringValue = NSLocalizedString("No Bookmarks", comment: "")
-        self.tipLabel.stringValue = NSLocalizedString("To create a bookmark, please right-click on the selected page and choose \"Add Bookmark\", or click \"Add\" button in the upper right corner.", comment: "")
         self.addBookButton.toolTip = NSLocalizedString("Add Bookmark", comment: "")
         
         self.dataSource = self.listView.document.bookmarks() ?? [CPDFBookmark]()
+        self.refreshUI()
         self.reloadData()
         self.addMenuTitle()
         
         self.initNotification()
     }
     
+    func refreshUI() {
+        self.bigTipLabel.font = NSFont.SFProTextRegular(14.0)
+        self.bigTipLabel.textColor = NSColor(hex: "#616469")
+        self.bigTipLabel.stringValue = NSLocalizedString("No Outlines", comment: "")
+        
+        
+        let title = NSLocalizedString("To create an outline, please right-click on the selected page and choose \"Add Outline\", or click \"Add\" in the upper right corner.", comment: "")
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.lineHeightMultiple = 1.32
+        paragraphStyle.alignment = .center
+        self.tipLabel.attributedStringValue = NSMutableAttributedString(string: title, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle, .foregroundColor : NSColor(hex: "#94989C")])
+    }
+    
     func reloadData() {
         self.dataSource = self.listView.document.bookmarks() ?? [CPDFBookmark]()
         self.dataSource.sort(){$0.pageIndex < $1.pageIndex}
@@ -291,7 +303,7 @@ extension KMBookMarkViewController : NSTableViewDelegate,NSTableViewDataSource {
             }
         }
         rowView.addSubview(rightBox)
-        rowView.selectionColor = NSColor(hex: "#CED0D499")
+        rowView.selectionColor = NSColor(hex: "#EDEEF0")
         
         return rowView
     }

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

@@ -21,18 +21,18 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView appearanceType="aqua" misplaced="YES" id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="260" height="300"/>
+            <rect key="frame" x="0.0" y="0.0" width="260" height="423"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <customView id="Pzi-Vp-0aL">
-                    <rect key="frame" x="0.0" y="0.0" width="260" height="300"/>
+                    <rect key="frame" x="0.0" y="0.0" width="260" height="423"/>
                     <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="299"/>
+                            <rect key="frame" x="0.0" y="0.0" width="260" height="422"/>
                             <subviews>
                                 <view translatesAutoresizingMaskIntoConstraints="NO" id="bIK-U7-Zqf">
-                                    <rect key="frame" x="0.0" y="255" width="260" height="44"/>
+                                    <rect key="frame" x="0.0" y="378" width="260" height="44"/>
                                     <subviews>
                                         <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3oi-0L-gXH">
                                             <rect key="frame" x="18" y="14" width="35" height="16"/>
@@ -77,21 +77,21 @@
                             </constraints>
                         </customView>
                         <box fixedFrame="YES" borderType="none" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="QXl-f3-0nT">
-                            <rect key="frame" x="0.0" y="0.0" width="260" height="256"/>
+                            <rect key="frame" x="0.0" y="0.0" width="260" height="379"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <view key="contentView" id="5Km-Gq-7Y6">
-                                <rect key="frame" x="0.0" y="0.0" width="260" height="256"/>
+                                <rect key="frame" x="0.0" y="0.0" width="260" height="379"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
                                     <scrollView fixedFrame="YES" 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="254"/>
+                                        <rect key="frame" x="0.0" y="2" width="260" height="377"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <clipView key="contentView" id="KFG-R9-2uc">
-                                            <rect key="frame" x="1" y="1" width="258" height="252"/>
+                                            <rect key="frame" x="1" y="1" width="258" height="375"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             <subviews>
                                                 <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="35" rowSizeStyle="automatic" viewBased="YES" id="jMm-Al-ZqF">
-                                                    <rect key="frame" x="0.0" y="0.0" width="258" height="252"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="258" height="375"/>
                                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                     <size key="intercellSpacing" width="17" height="0.0"/>
                                                     <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -147,7 +147,7 @@
                                             </subviews>
                                         </clipView>
                                         <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="UbR-Pn-9tg">
-                                            <rect key="frame" x="1" y="287" width="260" height="15"/>
+                                            <rect key="frame" x="1" y="238" width="258" height="15"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                         </scroller>
                                         <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="Ali-DJ-95W">
@@ -159,14 +159,14 @@
                             </view>
                         </box>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="H5X-YQ-dvn">
-                            <rect key="frame" x="0.0" y="0.0" width="260" height="255"/>
+                            <rect key="frame" x="0.0" y="0.0" width="260" height="378"/>
                             <subviews>
                                 <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8R5-DW-bXb">
-                                    <rect key="frame" x="64" y="64" width="132" height="128"/>
+                                    <rect key="frame" x="64" y="99" 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="34" width="136" height="17"/>
+                                    <rect key="frame" x="62" y="69" 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"/>
@@ -174,7 +174,7 @@
                                     </textFieldCell>
                                 </textField>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Msu-u0-gPn">
-                                    <rect key="frame" x="33" y="19" width="194" height="15"/>
+                                    <rect key="frame" x="33" y="54" 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"/>
@@ -191,7 +191,7 @@
                                 <constraint firstAttribute="trailing" secondItem="Msu-u0-gPn" secondAttribute="trailing" constant="35" id="fpI-vC-wce"/>
                                 <constraint firstItem="8R5-DW-bXb" firstAttribute="centerX" secondItem="H5X-YQ-dvn" secondAttribute="centerX" id="h2y-aH-peY"/>
                                 <constraint firstItem="BO0-hw-zv2" firstAttribute="top" secondItem="8R5-DW-bXb" secondAttribute="bottom" constant="13" id="lqe-5Y-3vw"/>
-                                <constraint firstItem="8R5-DW-bXb" firstAttribute="centerY" secondItem="H5X-YQ-dvn" secondAttribute="centerY" id="puW-f1-ThO"/>
+                                <constraint firstItem="8R5-DW-bXb" firstAttribute="top" secondItem="H5X-YQ-dvn" secondAttribute="top" constant="151" id="rhF-Ny-cyl"/>
                                 <constraint firstItem="BO0-hw-zv2" firstAttribute="leading" secondItem="8R5-DW-bXb" secondAttribute="leading" id="v9H-xv-zGQ"/>
                             </constraints>
                         </customView>
@@ -214,7 +214,7 @@
                 <constraint firstItem="Pzi-Vp-0aL" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="rYP-sd-AtW"/>
                 <constraint firstItem="Pzi-Vp-0aL" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="zTJ-d0-rbP"/>
             </constraints>
-            <point key="canvasLocation" x="-296" y="168.5"/>
+            <point key="canvasLocation" x="-296" y="229.5"/>
         </customView>
     </objects>
     <resources>

+ 4 - 0
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -346,9 +346,13 @@ extension KMLeftSideViewController: NSTableViewDelegate,NSTableViewDataSource {
         let cell : KMLiftSideCellView = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "KMLiftSideCellView"), owner: self) as! KMLiftSideCellView
         if row <= selectImage.count-1 {
             if self.dataSource[row] == self.type {
+                cell.isSelect = true
                 cell.mothedImage.image = NSImage(named: selectImage[row])
+                cell.backgroundColor(NSColor(hex: "#DFE1E5"))
             } else {
+                cell.isSelect = false
                 cell.mothedImage.image = NSImage(named: norImage[row])
+                cell.backgroundColor(NSColor.clear)
             }
         }
         cell.index = row

+ 12 - 12
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.xib

@@ -20,24 +20,24 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="kP6-mo-Sz6">
-                    <rect key="frame" x="0.0" y="0.0" width="48" height="308"/>
+                    <rect key="frame" x="0.0" y="0.0" width="48" height="296"/>
                     <view key="contentView" id="Q4W-NP-64T">
-                        <rect key="frame" x="0.0" y="0.0" width="48" height="308"/>
+                        <rect key="frame" x="0.0" y="0.0" width="48" height="296"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <scrollView autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="10" verticalLineScroll="24" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aU7-b6-SiZ">
-                                <rect key="frame" x="0.0" y="0.0" width="48" height="308"/>
+                                <rect key="frame" x="0.0" y="0.0" width="48" height="296"/>
                                 <clipView key="contentView" drawsBackground="NO" id="aGL-wm-zkF">
-                                    <rect key="frame" x="1" y="1" width="46" height="306"/>
+                                    <rect key="frame" x="1" y="1" width="46" height="294"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
-                                        <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" multipleSelection="NO" autosaveColumns="NO" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" id="dGj-Se-plG">
-                                            <rect key="frame" x="0.0" y="0.0" width="52" height="306"/>
+                                        <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" multipleSelection="NO" autosaveColumns="NO" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" id="dGj-Se-plG">
+                                            <rect key="frame" x="0.0" y="0.0" width="46" height="294"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             <color key="backgroundColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                             <color key="gridColor" red="1" green="0.99843658089999998" blue="0.99619259260000004" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                                             <tableColumns>
-                                                <tableColumn identifier="AutomaticTableColumnIdentifier.0" width="40" minWidth="40" maxWidth="1000" id="KwS-0B-ySc">
+                                                <tableColumn identifier="AutomaticTableColumnIdentifier.0" width="46" minWidth="40" maxWidth="1000" id="KwS-0B-ySc">
                                                     <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
                                                         <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
                                                         <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
@@ -50,15 +50,15 @@
                                                     <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
                                                     <prototypeCellViews>
                                                         <tableCellView identifier="KMLiftSideCellView" misplaced="YES" id="mYU-nI-1MW" customClass="KMLiftSideCellView" customModule="PDF_Office" customModuleProvider="target">
-                                                            <rect key="frame" x="0.0" y="0.0" width="52" height="24"/>
+                                                            <rect key="frame" x="0.0" y="0.0" width="46" height="24"/>
                                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                             <subviews>
                                                                 <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ybw-KZ-WjH">
-                                                                    <rect key="frame" x="-4" y="0.0" width="56" height="20"/>
+                                                                    <rect key="frame" x="-4" y="0.0" width="50" height="20"/>
                                                                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" image="KMImageNameSidebarAnnotationNor" id="Jhb-gj-ABR"/>
                                                                 </imageView>
                                                                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bgB-cQ-OUB">
-                                                                    <rect key="frame" x="-4" y="0.0" width="56" height="20"/>
+                                                                    <rect key="frame" x="-4" y="0.0" width="50" height="20"/>
                                                                     <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="b9y-Sd-KWO">
                                                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                                         <font key="font" metaFont="system"/>
@@ -119,9 +119,9 @@
                     <color key="fillColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                 </box>
                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="AX3-hJ-DWi">
-                    <rect key="frame" x="48" y="0.0" width="148" height="308"/>
+                    <rect key="frame" x="48" y="0.0" width="148" height="296"/>
                     <view key="contentView" id="hw8-Bc-FEV">
-                        <rect key="frame" x="0.0" y="0.0" width="148" height="308"/>
+                        <rect key="frame" x="0.0" y="0.0" width="148" height="296"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </view>
                 </box>

+ 30 - 0
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/KMLiftSideCellView.swift

@@ -8,10 +8,18 @@
 import Cocoa
 
 class KMLiftSideCellView: NSTableCellView {
+    
+    var box: KMBox?
     typealias selectClick = (_ index: Int) -> ()
     @IBOutlet weak var mothedImage: NSImageView!
     var buttonClick: selectClick?
     var index = 0
+    var isSelect: Bool = false
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.addBox()
+    }
     override func draw(_ dirtyRect: NSRect) {
         super.draw(dirtyRect)
         
@@ -20,4 +28,26 @@ class KMLiftSideCellView: NSTableCellView {
     @IBAction func updateLeftStyle(_ sender: Any) {
         self.buttonClick?(index)
     }
+    
+    func addBox() {
+        if self.box == nil {
+            self.box?.wantsLayer = true
+            self.box = KMBox(frame: self.bounds)
+            self.box?.borderWidth = 0
+            self.box?.boxType = .custom
+            self.addSubview(self.box!)
+            self.box?.moveCallback = { [unowned self] (mouseEntered, mouseBox) in
+                if mouseEntered {
+                    self.backgroundColor(NSColor(hex: "#DFE1E5"))
+                } else {
+                    if !isSelect {
+                        self.backgroundColor(NSColor.clear)
+                    }
+                }
+            }
+            self.box?.autoresizingMask = [.width, .height]
+        } else {
+            self.box!.frame = self.bounds
+        }
+    }
 }

+ 20 - 4
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Outline/KMOutlineViewController.swift

@@ -51,10 +51,6 @@ class KMOutlineViewController: NSViewController,NSMenuItemValidation {
         self.topView.wantsLayer = true
 //        self.topView.layer?.backgroundColor = NSColor.cl.cgColor
 //        self.outlineView.backgroundColor = NSColor.white
-        self.bigTipLabel.stringValue = NSLocalizedString("No Outlines", comment: "")
-        self.tipLabel.stringValue = NSLocalizedString("To create an outline, please right-click on the selected page and choose \"Add Outline\", or click \"Add\" in the upper right corner.", comment: "")
-        self.addButton.toolTip = NSLocalizedString("Add Outline", comment: "")
-        self.moreButton.toolTip = NSLocalizedString("More", comment: "")
         
         self.refreshUI()
         
@@ -71,6 +67,21 @@ class KMOutlineViewController: NSViewController,NSMenuItemValidation {
         
         self.titleLabel.textColor = NSColor(hex: "#252629")
         
+        self.bigTipLabel.font = NSFont.SFProTextRegular(14.0)
+        self.bigTipLabel.textColor = NSColor(hex: "#616469")
+        self.bigTipLabel.stringValue = NSLocalizedString("No Outlines", comment: "")
+        
+        
+        let title = NSLocalizedString("To create an outline, please right-click on the selected page and choose \"Add Outline\", or click \"Add\" in the upper right corner.", comment: "")
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.lineHeightMultiple = 1.32
+        paragraphStyle.alignment = .center
+        self.tipLabel.attributedStringValue = NSMutableAttributedString(string: title, attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle, .foregroundColor : NSColor(hex: "#94989C")])
+        
+        
+        self.addButton.toolTip = NSLocalizedString("Add Outline", comment: "")
+        self.moreButton.toolTip = NSLocalizedString("More", comment: "")
+        
     }
     
     private func addOutlineMenu(){
@@ -127,6 +138,11 @@ class KMOutlineViewController: NSViewController,NSMenuItemValidation {
         moreMenu.popUp(positioning: nil, at: NSPoint(x: rect.origin.x, y: rect.origin.y-10), in: self.view)
     }
     
+    
+    @IBAction func escButtonAction(_ sender: Any) {
+        self.outlineView.deselectAll(nil)
+    }
+    
     /// 右键菜单
     
     @objc private func toc_expandAllComments(item:NSMenuItem) {

+ 18 - 4
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Outline/KMOutlineViewController.xib

@@ -75,6 +75,20 @@
                                         <constraint firstAttribute="height" constant="1" id="Dde-XK-rE7"/>
                                     </constraints>
                                 </customView>
+                                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ic1-X7-DoC">
+                                    <rect key="frame" x="75" y="3" width="0.0" height="0.0"/>
+                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                    <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="2eC-bF-Y9F">
+                                        <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="Jd5-bn-p4X"/>
+                                    </connections>
+                                </button>
                             </subviews>
                             <constraints>
                                 <constraint firstItem="047-M9-be3" firstAttribute="centerY" secondItem="1cE-e7-OJl" secondAttribute="centerY" id="IAt-xj-L7r"/>
@@ -174,11 +188,11 @@
                             <rect key="frame" x="0.0" y="0.0" width="225" height="439"/>
                             <subviews>
                                 <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="UhI-Lv-F4F">
-                                    <rect key="frame" x="47" y="156" width="132" height="128"/>
+                                    <rect key="frame" x="47" y="159" width="132" height="128"/>
                                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="KMImageNameOutlineEmpty" id="G1n-nH-H7H"/>
                                 </imageView>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Opz-av-qdd">
-                                    <rect key="frame" x="45" y="127" width="136" height="17"/>
+                                    <rect key="frame" x="45" y="130" width="136" height="17"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="No bookmark found" id="we4-60-UgT">
                                         <font key="font" metaFont="system" size="14"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -186,7 +200,7 @@
                                     </textFieldCell>
                                 </textField>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fND-Yb-vUg">
-                                    <rect key="frame" x="33" y="112" width="159" height="15"/>
+                                    <rect key="frame" x="33" y="115" width="159" height="15"/>
                                     <textFieldCell key="cell" alignment="center" id="O6K-Ow-wsG">
                                         <font key="font" metaFont="cellTitle"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -196,10 +210,10 @@
                             </subviews>
                             <constraints>
                                 <constraint firstItem="UhI-Lv-F4F" firstAttribute="centerX" secondItem="bBy-ta-1Eq" secondAttribute="centerX" id="1fd-Nt-Cku"/>
-                                <constraint firstItem="UhI-Lv-F4F" firstAttribute="centerY" secondItem="bBy-ta-1Eq" secondAttribute="centerY" id="2pY-Py-d3J"/>
                                 <constraint firstItem="Opz-av-qdd" firstAttribute="top" secondItem="UhI-Lv-F4F" secondAttribute="bottom" constant="12" id="BMT-iO-yhi"/>
                                 <constraint firstItem="Opz-av-qdd" firstAttribute="trailing" secondItem="UhI-Lv-F4F" secondAttribute="trailing" id="ehW-U2-9Qq"/>
                                 <constraint firstItem="Opz-av-qdd" firstAttribute="leading" secondItem="UhI-Lv-F4F" secondAttribute="leading" id="fwJ-gj-Vr8"/>
+                                <constraint firstItem="UhI-Lv-F4F" firstAttribute="top" secondItem="bBy-ta-1Eq" secondAttribute="top" constant="152" id="j3H-76-Eu3"/>
                                 <constraint firstItem="fND-Yb-vUg" firstAttribute="leading" secondItem="bBy-ta-1Eq" secondAttribute="leading" constant="35" id="szs-5z-0gP"/>
                                 <constraint firstItem="Opz-av-qdd" firstAttribute="centerX" secondItem="UhI-Lv-F4F" secondAttribute="centerX" id="vdu-e9-TyM"/>
                                 <constraint firstItem="fND-Yb-vUg" firstAttribute="centerX" secondItem="UhI-Lv-F4F" secondAttribute="centerX" id="xcI-Vd-uJV"/>

+ 1 - 1
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Outline/OutlineView/KMOutlineRowView.swift

@@ -47,7 +47,7 @@ class KMOutlineRowView: NSTableRowView {
         set {
             super.isSelected = newValue
             if (newValue) {
-                self.layer?.backgroundColor = NSColor(hex: "#CED0D499").cgColor
+                self.layer?.backgroundColor = NSColor(hex: "#CED0D4", alpha: 0.6).cgColor
                 self.layer?.borderColor = NSColor(hex: "#CED0D4").cgColor
             } else {
                 self.layer?.backgroundColor = NSColor.clear.cgColor

+ 2 - 2
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMPDFThumbnailItem.swift

@@ -102,7 +102,7 @@ class KMPDFThumbnailItem: NSCollectionViewItem {
         set {
             super.isSelected = newValue
             if (newValue) {
-                self.view.layer?.backgroundColor = NSColor(hex: "#CED0D499").cgColor
+                self.view.layer?.backgroundColor = NSColor(hex: "#CED0D4", alpha: 0.6).cgColor
                 self.view.layer?.borderColor = NSColor(hex: "#CED0D4").cgColor
             } else {
                 self.view.layer?.backgroundColor = NSColor.clear.cgColor
@@ -222,7 +222,7 @@ class KMPDFThumbnailItem: NSCollectionViewItem {
         if self.isSelected {
             
         } else {
-            self.view.layer?.backgroundColor = NSColor(hex: "#EDEEF0").cgColor
+            self.view.layer?.backgroundColor = NSColor(hex: "#CED0D4", alpha: 0.6).cgColor
             self.view.layer?.borderColor = NSColor.clear.cgColor
         }
     }

+ 6 - 1
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMThumbnailViewController.swift

@@ -562,7 +562,6 @@ class KMThumbnailViewController: NSViewController {
     @IBAction func printItemAction(menu:NSMenuItem) {
         KMPrintWindowController.openDocument(inputDocument: self.listView?.document, inputPageRange: KMPrintPageRange(type: .allPage, selectPages: []))
     }
-    
 }
 
 protocol KMThumbnailViewControllerAction {}
@@ -583,6 +582,12 @@ extension KMThumbnailViewController: KMThumbnailViewControllerAction {
         self.deletePageItemAction(menu: NSMenuItem())
         
     }
+    
+    @IBAction func escButtonAction(_ sender: NSButton) {
+        self.selectPages(indexs: [])
+    }
+    
+    
 }
 
 //MARK: KMPDFThumbnailViewDelegate

+ 14 - 0
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMThumbnailViewController.xib

@@ -46,6 +46,20 @@
                                 <action selector="doublePageAction:" target="-2" id="dCI-g4-Gkm"/>
                             </connections>
                         </button>
+                        <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="78q-yY-AEA">
+                            <rect key="frame" x="220" y="3" width="0.0" height="0.0"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="s09-io-xhL">
+                                <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="lcr-dF-51N"/>
+                            </connections>
+                        </button>
                     </subviews>
                     <constraints>
                         <constraint firstItem="xyA-oR-kpO" firstAttribute="centerY" secondItem="ByL-P0-CBo" secondAttribute="centerY" id="HyG-hF-nPM"/>