Selaa lähdekoodia

【fix】【BOTA】注释列表筛选界面UI不一致

tangchao 4 kuukautta sitten
vanhempi
commit
56b35c232e

+ 7 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/Controller/KMNoteOutlineFilterViewController.swift

@@ -124,12 +124,14 @@ class KMNoteOutlineFilterViewController: NSViewController {
             for state in self.stateArray_ {
                 let string = KMPDFAnnotationStateGetString(state: state) ?? ""
                 let width = self._widthOfString(string, font: .SFProTextRegularFont(14)) + 12 + 16 + 8 + 8
+                var replaceLine = false
                 if ((stateW + width + 8) > self.authorView.frame.size.width) { // 换行
 //                    stateW = 0.0
                     stateW = width + 8
                     height = height + 0.0 + 28.0
                     
                     preViewM?.itemSize.width += offset
+                    replaceLine = true
                 } else {
                     stateW = stateW + width + 8
                 }
@@ -148,6 +150,10 @@ class KMNoteOutlineFilterViewController: NSViewController {
                     if self.stateArray_.last == state {
                         viewM.itemSize.width += offset
                     }
+                } else {
+                    if self.stateArray_.last == state && replaceLine {
+                        viewM.itemSize.width += offset
+                    }
                 }
                 
                 preViewM = viewM
@@ -236,6 +242,7 @@ class KMNoteOutlineFilterViewController: NSViewController {
     
     lazy var stateLabel: NSTextField = {
         let view = NSTextField(labelWithString: NSLocalizedString("Note State", comment: ""))
+        view.font = .boldSystemFont(ofSize: 12)
         return view
     }()