3
0

2 کامیت‌ها af479ab317 ... 8cda73bf3a

نویسنده SHA1 پیام تاریخ
  tangchao 8cda73bf3a 【注释回复】刷选窗口UI调整 21 ساعت پیش
  tangchao f1235cc28e 【注释回复】细节处理 1 روز پیش

+ 11 - 0
PDF Office/PDF Master/Class/Common/Tools/KMTools.swift

@@ -748,6 +748,17 @@ extension KMTools {
         return dateFormatter_?.string(from: date) ?? ""
     }
     
+    @objc class func timeString(timeDate date: Date, formatString: String) -> String {
+        if dateFormatter_ == nil {
+            dateFormatter_ = DateFormatter()
+        }
+        let calendar = Calendar.current
+        let nowCmps = calendar.dateComponents([.day, .month, .year], from: Date())
+        let currentCmps = calendar.dateComponents([.day, .month, .year], from: date)
+        dateFormatter_?.dateFormat = formatString
+        return dateFormatter_?.string(from: date) ?? ""
+    }
+    
     @objc class func isFileGreaterThan10MB(atPath filePath: String) -> Bool {
         let fileManager = FileManager.default
 

+ 13 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/Controller/KMNoteOutlineFilterViewController.swift

@@ -30,7 +30,7 @@ class KMNoteOutlineFilterViewController: NSViewController {
         self._typeMutableArray = NSMutableArray()
         self._authorMutableArray = NSMutableArray()
         
-        self.stateArray_ = [.marked, .unMarked, .accepted, .rejected, .canceled, .completed, .none]
+//        self.stateArray_ = [.marked, .unMarked, .accepted, .rejected, .canceled, .completed, .none]
             
         for annotation in self._notesArray ?? [] {
             guard let _anno = annotation as? CPDFAnnotation else {
@@ -40,6 +40,7 @@ class KMNoteOutlineFilterViewController: NSViewController {
                 let noteColor = _anno.color
                 let noteType = _anno.type ?? ""
                 let authorString = _anno.userName() ?? ""
+                
                     
                 self._addNoteColorWith(noteColor)
                 if let data = _anno as? CPDFLineAnnotation {
@@ -153,6 +154,10 @@ class KMNoteOutlineFilterViewController: NSViewController {
         }
     }
     
+    func updateStates(states: [CPDFAnnotationState]) {
+        self.stateArray_ = states
+    }
+    
     var selectTypeArray: NSMutableArray?
     var selectColorArray: NSMutableArray?
     var selectAuthorArray: NSMutableArray?
@@ -193,11 +198,13 @@ class KMNoteOutlineFilterViewController: NSViewController {
         view.minMagnification = 1.0
         view.scrollerStyle = .overlay
         
+        view.drawsBackground = false
+        view.borderType = .noBorder
         view.wantsLayer = true
         view.layer?.backgroundColor = NSColor.clear.cgColor
         
         view.wantsLayer = true
-        view.contentView.layer?.backgroundColor = .white
+        view.contentView.layer?.backgroundColor = .clear
         
         return view
     }()
@@ -224,7 +231,8 @@ class KMNoteOutlineFilterViewController: NSViewController {
         view.isSelectable = true
         
         view.wantsLayer = true
-        view.layer?.backgroundColor = NSColor.km_init(hex: "#F7F8FA").cgColor
+//        view.layer?.backgroundColor = NSColor.km_init(hex: "#F7F8FA").cgColor
+        view.layer?.backgroundColor = NSColor.clear.cgColor
         view.isSelectable = true
         view.allowsMultipleSelection = true
         
@@ -402,10 +410,12 @@ extension KMNoteOutlineFilterViewController {
     private func _updateViewColor() {
         if (KMAppearance.isDarkMode()) {
             self.view.layer?.backgroundColor = NSColor(red: 54.0/255.0, green: 54.0/255.0, blue: 54.0/255.0, alpha: 1).cgColor
+//            self.collectionView.layer?.backgroundColor = NSColor(red: 54.0/255.0, green: 54.0/255.0, blue: 54.0/255.0, alpha: 1).cgColor
             self.cancelButton.layer?.backgroundColor = NSColor(red: 86/255.0, green: 88/255.0, blue: 90/255.0, alpha: 1).cgColor
             self.OKButton.layer?.backgroundColor = NSColor(red: 78/255.0, green: 127/255.0, blue: 219/255.0, alpha: 1).cgColor
         } else {
             self.view.layer?.backgroundColor = NSColor(red: 238/255.0, green: 238/255.0, blue: 238/255.0, alpha: 1).cgColor
+//            self.collectionView.layer?.backgroundColor = NSColor(red: 238/255.0, green: 238/255.0, blue: 238/255.0, alpha: 1).cgColor
             self.cancelButton.layer?.backgroundColor = NSColor(red: 218/255.0, green: 219/255.0, blue: 222/255.0, alpha: 1).cgColor
             self.OKButton.layer?.backgroundColor = NSColor(red: 39/255.0, green: 60/255.0, blue: 98/255.0, alpha: 1).cgColor
         }

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteFilterStateCollevtionViewItem.swift

@@ -17,6 +17,7 @@ class KMNoteFilterStateCollevtionViewItem: NSCollectionViewItem {
         // Do view setup here.
         
         self.box.cornerRadius = 0
+        self.box.borderColor = NSColor(hex: "#E2E3E6")
         
         self.label.textColor = KMAppearance.Layout.h0Color()
     }

+ 20 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteFooterCellView.swift

@@ -14,7 +14,7 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
     @IBOutlet weak var replyButton: NSButton!
     @IBOutlet weak var cancelButton: NSButton!
     
-    @IBOutlet weak var commentBox: NSBox!
+    @IBOutlet weak var commentBox: KMBox!
     @IBOutlet weak var commentIv: NSImageView!
     @IBOutlet weak var commentNumberLabel: NSTextField!
     @IBOutlet weak var commentButton: NSButton!
@@ -24,6 +24,8 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
     @IBOutlet weak var operationIv2: NSImageView!
     @IBOutlet weak var operationButton: NSButton!
     
+    @IBOutlet weak var operationIvHover: KMCoverButton!
+    
     @IBOutlet weak var inputBoxHeightConst: NSLayoutConstraint!
     @IBOutlet weak var replyButtonTopConst: NSLayoutConstraint!
     
@@ -92,6 +94,13 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
         self.cancelButton.action = #selector(cancelAction)
         
         self.commentBox.borderWidth = 0
+        self.commentBox.moveCallback = { enter, theBox in
+            if enter {
+                theBox.fillColor = NSColor(hex: "#477EDE").withAlphaComponent(0.1)
+            } else {
+                theBox.fillColor = .clear
+            }
+        }
         self.commentIv.image = NSImage(named: "KMImageNameBotaNoteComment")
         self.commentButton.title = ""
         self.commentButton.target = self
@@ -104,6 +113,16 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
         self.operationButton.target = self
         self.operationButton.action = #selector(operationAction)
         
+        self.operationIvHover.wantsLayer = true
+        self.operationIvHover.layer?.cornerRadius = 4
+        self.operationIvHover.coverAction = { btn, act in
+            if act == .enter {
+                btn.layer?.backgroundColor = NSColor(hex: "#477EDE").withAlphaComponent(0.1).cgColor
+            } else if act == .exit {
+                btn.layer?.backgroundColor = .clear
+            }
+        }
+        
         self.updateUI(expand: false, animated: false)
         
         self.commentNumberLabel.font = .SFProTextRegularFont(11)

+ 31 - 16
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteFooterCellView.xib

@@ -20,6 +20,7 @@
                 <outlet property="operationButton" destination="7m2-cH-Gl5" id="KLF-9o-FZU"/>
                 <outlet property="operationIv" destination="nhM-fn-Lml" id="0XX-Wz-2NY"/>
                 <outlet property="operationIv2" destination="33u-Me-AUW" id="xAb-2S-GWS"/>
+                <outlet property="operationIvHover" destination="uM3-3G-Uw3" id="xT1-st-4Dd"/>
                 <outlet property="replyBox" destination="Zps-kZ-RvQ" id="sqd-Ip-mVO"/>
                 <outlet property="replyButton" destination="d2W-fA-bBI" id="tcc-kg-HEU"/>
                 <outlet property="replyButtonTopConst" destination="fbR-we-VWb" id="uOo-fO-yWA"/>
@@ -91,14 +92,14 @@
                         <constraint firstAttribute="height" constant="64" id="Mlc-8C-aLh"/>
                     </constraints>
                 </box>
-                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="AKC-lX-l6Q">
-                    <rect key="frame" x="381" y="12" width="60" height="20"/>
+                <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="AKC-lX-l6Q" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                    <rect key="frame" x="377" y="12" width="64" height="20"/>
                     <view key="contentView" id="D5W-gK-4uq">
-                        <rect key="frame" x="1" y="1" width="58" height="18"/>
+                        <rect key="frame" x="1" y="1" width="62" height="18"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="M9A-Ef-540">
-                                <rect key="frame" x="0.0" y="-2" width="20" height="20"/>
+                                <rect key="frame" x="2" y="-3" width="20" height="20"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="20" id="3YT-S7-ZrS"/>
                                     <constraint firstAttribute="height" constant="20" id="scF-8s-hLN"/>
@@ -106,7 +107,7 @@
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="eJN-tF-XK9"/>
                             </imageView>
                             <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qTH-Ub-ikb">
-                                <rect key="frame" x="23" y="1" width="37" height="16"/>
+                                <rect key="frame" x="25" y="1" width="37" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="6hx-gG-YNt">
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -114,7 +115,7 @@
                                 </textFieldCell>
                             </textField>
                             <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qqx-Rf-Mhy">
-                                <rect key="frame" x="0.0" y="0.0" width="58" height="18"/>
+                                <rect key="frame" x="0.0" y="0.0" width="62" height="18"/>
                                 <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="vGY-Fc-PHo">
                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                     <font key="font" metaFont="system"/>
@@ -125,11 +126,11 @@
                             <constraint firstItem="qTH-Ub-ikb" firstAttribute="leading" secondItem="M9A-Ef-540" secondAttribute="trailing" constant="5" id="0SM-Qf-oDH"/>
                             <constraint firstItem="qqx-Rf-Mhy" firstAttribute="leading" secondItem="D5W-gK-4uq" secondAttribute="leading" id="17i-F0-QRF"/>
                             <constraint firstItem="qqx-Rf-Mhy" firstAttribute="top" secondItem="D5W-gK-4uq" secondAttribute="top" id="Jmk-sT-sUb"/>
-                            <constraint firstAttribute="trailing" secondItem="qTH-Ub-ikb" secondAttribute="trailing" id="PbM-0f-Dq2"/>
+                            <constraint firstAttribute="trailing" secondItem="qTH-Ub-ikb" secondAttribute="trailing" constant="2" id="PbM-0f-Dq2"/>
                             <constraint firstAttribute="trailing" secondItem="qqx-Rf-Mhy" secondAttribute="trailing" id="U6T-R3-4lt"/>
                             <constraint firstAttribute="bottom" secondItem="qqx-Rf-Mhy" secondAttribute="bottom" id="gO2-jw-T0f"/>
-                            <constraint firstItem="M9A-Ef-540" firstAttribute="leading" secondItem="D5W-gK-4uq" secondAttribute="leading" id="hzj-u7-X7f"/>
-                            <constraint firstItem="M9A-Ef-540" firstAttribute="top" secondItem="D5W-gK-4uq" secondAttribute="top" id="lZ9-fB-zgU"/>
+                            <constraint firstItem="M9A-Ef-540" firstAttribute="leading" secondItem="D5W-gK-4uq" secondAttribute="leading" constant="2" id="hzj-u7-X7f"/>
+                            <constraint firstItem="M9A-Ef-540" firstAttribute="top" secondItem="D5W-gK-4uq" secondAttribute="top" constant="1" id="lZ9-fB-zgU"/>
                             <constraint firstItem="qTH-Ub-ikb" firstAttribute="centerY" secondItem="D5W-gK-4uq" secondAttribute="centerY" id="ujc-4g-ZcD"/>
                         </constraints>
                     </view>
@@ -138,21 +139,32 @@
                     </constraints>
                 </box>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="D8j-Z1-l9J">
-                    <rect key="frame" x="331" y="12" width="34" height="20"/>
+                    <rect key="frame" x="323" y="12" width="38" height="20"/>
                     <view key="contentView" id="c41-HI-s8f">
-                        <rect key="frame" x="1" y="1" width="32" height="18"/>
+                        <rect key="frame" x="1" y="1" width="36" height="18"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nhM-fn-Lml">
-                                <rect key="frame" x="0.0" y="1" width="16" height="16"/>
+                                <rect key="frame" x="2" y="1" width="16" height="16"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="16" id="fwj-3t-zk0"/>
                                     <constraint firstAttribute="height" constant="16" id="okA-gC-I4Q"/>
                                 </constraints>
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="dLo-wA-93h"/>
                             </imageView>
+                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uM3-3G-Uw3" customClass="KMCoverButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                <rect key="frame" x="0.0" y="-1" width="20" height="20"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="20" id="GAQ-OB-ec7"/>
+                                    <constraint firstAttribute="height" constant="20" id="qJi-kT-oQ6"/>
+                                </constraints>
+                                <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="RMl-bc-0EZ">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                            </button>
                             <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="33u-Me-AUW">
-                                <rect key="frame" x="16" y="1" width="16" height="16"/>
+                                <rect key="frame" x="20" y="1" width="16" height="16"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="16" id="1hs-7X-St7"/>
                                     <constraint firstAttribute="width" constant="16" id="KzI-dz-8UV"/>
@@ -160,7 +172,7 @@
                                 <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="DVD-io-itp"/>
                             </imageView>
                             <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7m2-cH-Gl5">
-                                <rect key="frame" x="0.0" y="0.0" width="32" height="18"/>
+                                <rect key="frame" x="0.0" y="0.0" width="36" height="18"/>
                                 <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="eVZ-K1-wkb">
                                     <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                     <font key="font" metaFont="system"/>
@@ -171,10 +183,12 @@
                             <constraint firstAttribute="trailing" secondItem="33u-Me-AUW" secondAttribute="trailing" id="0Tb-QJ-IKJ"/>
                             <constraint firstAttribute="trailing" secondItem="7m2-cH-Gl5" secondAttribute="trailing" id="Fk9-mQ-m49"/>
                             <constraint firstItem="7m2-cH-Gl5" firstAttribute="leading" secondItem="c41-HI-s8f" secondAttribute="leading" id="Kqm-hP-sQD"/>
-                            <constraint firstItem="nhM-fn-Lml" firstAttribute="leading" secondItem="c41-HI-s8f" secondAttribute="leading" id="OBd-5s-BCo"/>
+                            <constraint firstItem="nhM-fn-Lml" firstAttribute="leading" secondItem="c41-HI-s8f" secondAttribute="leading" constant="2" id="OBd-5s-BCo"/>
+                            <constraint firstItem="uM3-3G-Uw3" firstAttribute="centerY" secondItem="c41-HI-s8f" secondAttribute="centerY" id="UV2-X4-Y1z"/>
+                            <constraint firstItem="uM3-3G-Uw3" firstAttribute="leading" secondItem="c41-HI-s8f" secondAttribute="leading" id="a5x-2G-t8S"/>
                             <constraint firstAttribute="bottom" secondItem="7m2-cH-Gl5" secondAttribute="bottom" id="b5U-df-A6h"/>
                             <constraint firstItem="nhM-fn-Lml" firstAttribute="centerY" secondItem="c41-HI-s8f" secondAttribute="centerY" id="bnd-ru-hgg"/>
-                            <constraint firstItem="33u-Me-AUW" firstAttribute="leading" secondItem="nhM-fn-Lml" secondAttribute="trailing" id="jsj-cO-Uky"/>
+                            <constraint firstItem="33u-Me-AUW" firstAttribute="leading" secondItem="nhM-fn-Lml" secondAttribute="trailing" constant="2" id="jsj-cO-Uky"/>
                             <constraint firstItem="33u-Me-AUW" firstAttribute="centerY" secondItem="c41-HI-s8f" secondAttribute="centerY" id="k1c-NZ-r9b"/>
                             <constraint firstItem="7m2-cH-Gl5" firstAttribute="top" secondItem="c41-HI-s8f" secondAttribute="top" id="ttw-A3-CZu"/>
                         </constraints>
@@ -207,6 +221,7 @@
                 <outlet property="operationButton" destination="7m2-cH-Gl5" id="tTi-vO-4R6"/>
                 <outlet property="operationIv" destination="nhM-fn-Lml" id="4eY-xa-myG"/>
                 <outlet property="operationIv2" destination="33u-Me-AUW" id="JAg-dD-R7S"/>
+                <outlet property="operationIvHover" destination="uM3-3G-Uw3" id="7rA-4J-hjF"/>
                 <outlet property="replyBox" destination="Zps-kZ-RvQ" id="IzR-7Q-Nck"/>
                 <outlet property="replyButton" destination="d2W-fA-bBI" id="MNi-3b-r36"/>
                 <outlet property="replyButtonTopConst" destination="fbR-we-VWb" id="BOc-wA-UTX"/>

+ 2 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTableViewCell.swift

@@ -128,6 +128,7 @@ class KMNoteTableViewCell: NSTableCellView {
         self.annotationContentLabel.cell?.truncatesLastVisibleLine = true
         self.annotationContentLabel.isEditable = false
         
+        self.markupButton.toolTip = NSLocalizedString("Add or remove marked", comment: "")
         self.markupButton.target = self
         self.markupButton.action = #selector(markupAction)
         self.markupButton.coverAction = { [weak self] btn, act in
@@ -255,6 +256,7 @@ extension KMNoteTableViewCell {
             self.timeLabel.lineBreakMode = .byTruncatingTail
             self.timeLabel.cell?.truncatesLastVisibleLine = true
             self.timeLabel.isHidden = false
+            self.timeLabel.toolTip = dateString
         } else {
             self.timeLabel.isHidden = true
         }

+ 8 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMSectionCellView.swift

@@ -12,6 +12,14 @@ class KMSectionCellView: NSTableCellView, NibLoadable {
     @IBOutlet weak var countLabel: NSTextField!
     @IBOutlet weak var expandButton: NSButton!
     
+    @IBOutlet weak var titleLeftConst: NSLayoutConstraint!
+    
+    var contentInset: NSEdgeInsets = .init() {
+        didSet {
+            self.titleLeftConst.constant = self.contentInset.left
+        }
+    }
+    
     var itemClick: KMCommonClickBlock?
     
     var isExpand = false {

+ 6 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMSectionCellView.xib

@@ -6,7 +6,11 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMSectionCellView" customModule="PDF_Reader_Pro" customModuleProvider="target"/>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMSectionCellView" customModule="PDF_Reader_Pro" customModuleProvider="target">
+            <connections>
+                <outlet property="titleLeftConst" destination="5zC-Az-1Sz" id="5Sn-1k-3TS"/>
+            </connections>
+        </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <tableCellView misplaced="YES" id="qeq-9Z-4A5" customClass="KMSectionCellView" customModule="PDF_Reader_Pro" customModuleProvider="target">
@@ -56,6 +60,7 @@
                 <outlet property="expandButton" destination="1Z2-Dc-fxz" id="V51-pv-Ftg"/>
                 <outlet property="textField" destination="Ivc-dC-Pho" id="0Vo-aD-eW8"/>
                 <outlet property="titleLabel" destination="Ivc-dC-Pho" id="9V4-S9-p71"/>
+                <outlet property="titleLeftConst" destination="5zC-Az-1Sz" id="LLq-pa-olR"/>
             </connections>
             <point key="canvasLocation" x="101.5" y="-5"/>
         </tableCellView>

+ 18 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Note.swift

@@ -138,9 +138,9 @@ extension KMLeftSideViewController {
         self.noteDoneButton.layer?.backgroundColor = KMAppearance.Interactive.a0Color().cgColor
         self.noteDoneButton.layer?.cornerRadius = 4.0
         
-        self.noteHeaderView.wantsLayer = true
-        self.noteHeaderView.layer?.backgroundColor = KMAppearance.Else.textTagColor().cgColor
-        self.noteHeaderView.layer?.cornerRadius = 1.0
+//        self.noteHeaderView.wantsLayer = true
+//        self.noteHeaderView.layer?.backgroundColor = KMAppearance.Else.textTagColor().cgColor
+//        self.noteHeaderView.layer?.cornerRadius = 1.0
         let sortType = KMDataManager.ud_integer(forKey: Self.Key.noteSortTypeKey)
         if (sortType == 1) {
             self.noteSortType = KMNoteSortType(rawValue: sortType) ?? .none
@@ -631,6 +631,21 @@ extension KMLeftSideViewController {
         filterViewController.listView = self.listView
         filterViewController.view.layer?.backgroundColor = .clear
 
+        var states: [CPDFAnnotationState] = [.none, .unMarked]
+        for anno in self.allAnnotations {
+            if let reviewS = self.noteReplyHanddler.fetchReviewState(anno) {
+                if states.contains(reviewS) == false {
+                    states.append(reviewS)
+                }
+            }
+            if let markS = self.noteReplyHanddler.fetchAnnoState(anno) {
+                if states.contains(markS) == false {
+                    states.append(markS)
+                }
+            }
+        }
+        
+        filterViewController.updateStates(states: states) 
         filterViewController.setNotesArray(self.allAnnotations as NSArray)
         filterViewController.applyFilterCallback = { [weak self] typeArr, colorArr, authorArr, isEmpty in
             menu.cancelTracking()

+ 13 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -1893,9 +1893,10 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
             var cnt = 0
             for sectionM in self.annoListModel?.datas ?? [] {
                 if sectionM.items.count > 0 {
-                    //                    cnt += (sectionM.itemCount + 1)
-                    //                }
                     cnt += 1
+                    if sectionM.isExpand == false {
+                        continue
+                    }
                     for item in sectionM.items {
                         cnt += 1
                         if let annoItem = item as? KMBotaAnnotationModel {
@@ -1979,6 +1980,9 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
                     isSection = true
                     break
                 }
+                if sectionM.isExpand == false {
+                    continue
+                }
                 for item in sectionM.items {
                     idx += 1
                     if index + 1 == idx {
@@ -2059,13 +2063,14 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
                 if cell == nil {
                     cell = KMSectionCellView.createFromNib()
                 }
-                cell?.isExpand = true
+                cell?.isExpand = data.isExpand
+                cell?.contentInset = NSEdgeInsets(top: 0, left: 8, bottom: 0, right: 0)
                 if self.noteSortType == .page {
                     let pageIndex = data.items.first?.anno?.page.pageIndex() ?? 0
                     cell?.titleLabel.stringValue = NSLocalizedString("Page", comment: "") + " \(pageIndex + 1)"
                 } else {
                     if let date = data.items.first?.anno?.modificationDate() {
-                        let string = KMTools.timeString(timeDate: date)
+                        let string = KMTools.timeString(timeDate: date, formatString: "yyyy-MM-dd")
                         cell?.titleLabel.stringValue = string
                     } else {
                         cell?.titleLabel.stringValue = ""
@@ -2075,7 +2080,9 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
                 
                 cell?.itemClick = { idx, _ in
                     if idx == 1 { // 收取 & 展开
-                        KMPrint("")
+                        data.isExpand = !data.isExpand
+                        
+                        self.noteOutlineView.reloadData()
                     }
                 }
                 return cell
@@ -2106,6 +2113,7 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
                 } else if state == .rejected {
                     cell?.operationIv.image = NSImage(named: "KMImageNameBotaNoteStateRejected")
                 }
+                cell?.operationBox.toolTip = KMPDFAnnotationStateGetString(state: state)
                 
                 if let con = data.replyModel?.replyAnno?.contents, con.isEmpty == false {
                     cell?.inputTextF.stringValue = con

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Tools/KMNoteReplyHanddler.swift

@@ -209,6 +209,10 @@ class KMNoteReplyHanddler: NSObject {
         vc.textColor = KMAppearance.Layout.h0Color()
         vc.enterFillColor = KMAppearance.Interactive.s0Color()
         
+        let state = self.fetchReviewState(anno) ?? .none
+        let stateStr = KMPDFAnnotationStateGetString(state: state) ?? NSLocalizedString("None", comment: "")
+        vc.selectedItems = [stateStr]
+        
         vc.downCallback = { [weak self] result, data in
             self?.popover_?.close()
             

+ 1 - 0
PDF Office/PDF Master/Strings/en.lproj/Localizable.strings

@@ -4236,3 +4236,4 @@
 "Get Special Offer" = "Get Special Offer";
 "Contact Us" = "Contact Us";
 
+"Add or remove marked" = "Add or remove marked";