|
@@ -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
|
|
|
}
|