Procházet zdrojové kódy

【注释回复】暗黑场景补充

tangchao před 5 měsíci
rodič
revize
6178842317

+ 1 - 1
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMore.imageset/Contents.json

@@ -11,7 +11,7 @@
           "value" : "dark"
         }
       ],
-      "filename" : "nor=nor 1.pdf",
+      "filename" : "more.pdf",
       "idiom" : "universal"
     }
   ],

+ 1 - 1
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMore.imageset/nor=nor 1.pdf

@@ -11,7 +11,7 @@ stream
 /DeviceRGB cs
 q
 1.000000 0.000000 -0.000000 1.000000 10.500000 4.500000 cm
-0.262745 0.278431 0.301961 scn
+0.784314 0.788235 0.800000 scn
 1.500000 12.000000 m
 2.328427 12.000000 3.000000 12.671573 3.000000 13.500000 c
 3.000000 14.328427 2.328427 15.000000 1.500000 15.000000 c

+ 1 - 1
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMoreCover.imageset/Contents.json

@@ -11,7 +11,7 @@
           "value" : "dark"
         }
       ],
-      "filename" : "nor=hov 1.pdf",
+      "filename" : "nor=hov-2.pdf",
       "idiom" : "universal"
     }
   ],

binární
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMoreCover.imageset/nor=hov 1.pdf


+ 12 - 4
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteFooterCellView.swift

@@ -49,8 +49,6 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
         
 //        self.replyBox.fillColor = .red
         self.inputBox.cornerRadius = 0
-        self.inputBox.borderColor = NSColor(white: 0, alpha: 0.2)
-
         self.inputBox.moveCallback = { [weak self] enter, theBox in
             if enter {
                 theBox.borderColor = NSColor.km_init(hex: "#1770F4")
@@ -88,7 +86,11 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
             if result {
                 self?.inputBox.borderColor = NSColor.km_init(hex: "#1770F4")
             } else {
-                self?.inputBox.borderColor = NSColor(white: 0, alpha: 0.2)
+                if KMAppearance.isDarkMode() {
+                    self?.inputBox.borderColor = NSColor(hex: "#56585A")
+                } else {
+                    self?.inputBox.borderColor = NSColor(white: 0, alpha: 0.2)
+                }
             }
         }
         self.replyButton.title = NSLocalizedString("Reply", comment: "")
@@ -183,8 +185,10 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
         
         if KMAppearance.isDarkMode() {
             self.inputBox.fillColor = NSColor(hex: "#393C3E")
+            self.inputBox.borderColor = NSColor(hex: "#56585A")
         } else {
             self.inputBox.fillColor = .white
+            self.inputBox.borderColor = NSColor(white: 0, alpha: 0.2)
         }
     }
 }
@@ -192,7 +196,11 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
 extension KMNoteFooterCellView: NSTextFieldDelegate {
     func controlTextDidEndEditing(_ obj: Notification) {
         if self.inputTextF.isEqual(to: obj.object) {
-            self.inputBox.borderColor = NSColor(white: 0, alpha: 0.2)
+            if KMAppearance.isDarkMode() {
+                self.inputBox.borderColor = NSColor(hex: "#56585A")
+            } else {
+                self.inputBox.borderColor = NSColor(white: 0, alpha: 0.2)
+            }
             self.flag_ = false
         }
     }

+ 16 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteReplyCellView.swift

@@ -67,7 +67,11 @@ class KMNoteReplyCellView: NSTableCellView, NibLoadable {
         }
         
         self.leftVorLineView.wantsLayer = true
-        self.leftVorLineView.layer?.backgroundColor = NSColor(white: 0, alpha: 0.2).cgColor
+        if KMAppearance.isDarkMode() {
+            self.leftVorLineView.layer?.backgroundColor = NSColor(hex: "E2E3E6").cgColor
+        } else {
+            self.leftVorLineView.layer?.backgroundColor = NSColor(white: 0, alpha: 0.2).cgColor
+        }
     }
     
     @objc func moreAction(_ sender: NSButton) {
@@ -77,4 +81,15 @@ class KMNoteReplyCellView: NSTableCellView, NibLoadable {
     override func mouseUp(with event: NSEvent) {
         super.mouseUp(with: event)
     }
+    
+    override func updateLayer() {
+        super.updateLayer()
+        
+        self.leftVorLineView.wantsLayer = true
+        if KMAppearance.isDarkMode() {
+            self.leftVorLineView.layer?.backgroundColor = NSColor(hex: "E2E3E6").cgColor
+        } else {
+            self.leftVorLineView.layer?.backgroundColor = NSColor(white: 0, alpha: 0.2).cgColor
+        }
+    }
 }