|
@@ -50,7 +50,7 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
|
|
|
// self.replyBox.fillColor = .red
|
|
|
self.inputBox.cornerRadius = 0
|
|
|
self.inputBox.borderColor = NSColor(white: 0, alpha: 0.2)
|
|
|
- self.inputBox.fillColor = .white
|
|
|
+
|
|
|
self.inputBox.moveCallback = { [weak self] enter, theBox in
|
|
|
if enter {
|
|
|
theBox.borderColor = NSColor.km_init(hex: "#1770F4")
|
|
@@ -64,7 +64,6 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
|
|
|
}
|
|
|
self.inputBox.downCallback = { [weak self] enter, theBox, _ in
|
|
|
theBox.window?.makeFirstResponder(self?.inputTextF)
|
|
|
-
|
|
|
}
|
|
|
self.inputTextF.drawsBackground = false
|
|
|
self.inputTextF.isBordered = false
|
|
@@ -74,8 +73,18 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
|
|
|
self.inputTextF.wantsLayer = true
|
|
|
self.inputTextF.layer?.backgroundColor = .clear
|
|
|
self.inputTextF.delegate = self
|
|
|
+ let cell = self.inputTextF.cell as? NSTextFieldCell
|
|
|
+// cell?.drawsBackground = false
|
|
|
+ cell?.backgroundColor = .red
|
|
|
self.inputTextF.firstResponderHandler = { [weak self] result in
|
|
|
self?.flag_ = result
|
|
|
+ for sv in self?.inputTextF.subviews ?? [] {
|
|
|
+ for childsv in sv.subviews {
|
|
|
+ if let data = childsv as? NSTextView {
|
|
|
+ data.backgroundColor = .clear
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if result {
|
|
|
self?.inputBox.borderColor = NSColor.km_init(hex: "#1770F4")
|
|
|
} else {
|
|
@@ -108,7 +117,7 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
|
|
|
|
|
|
self.operationBox.borderWidth = 0
|
|
|
self.operationIv.image = NSImage(named: "KMImageNameBotaNoteOpration")
|
|
|
- self.operationIv2.image = NSImage(named: "KMImageNameBotaNoteExpand")
|
|
|
+ self.operationIv2.image = NSImage(named: "KMImageNameNoteStateMore")
|
|
|
self.operationButton.title = ""
|
|
|
self.operationButton.target = self
|
|
|
self.operationButton.action = #selector(operationAction)
|
|
@@ -168,6 +177,16 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
|
|
|
@objc func operationAction(_ sender: NSButton) {
|
|
|
self.itemClick?(2, sender)
|
|
|
}
|
|
|
+
|
|
|
+ override func updateLayer() {
|
|
|
+ super.updateLayer()
|
|
|
+
|
|
|
+ if KMAppearance.isDarkMode() {
|
|
|
+ self.inputBox.fillColor = NSColor(hex: "#393C3E")
|
|
|
+ } else {
|
|
|
+ self.inputBox.fillColor = .white
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
extension KMNoteFooterCellView: NSTextFieldDelegate {
|