Browse Source

AI - 划词翻译超过150个字时,会在翻译弹窗中显示超出状态

wanjun 1 year ago
parent
commit
0f8f4febec

+ 5 - 3
PDF Office/PDF Master/Class/Home/WindowController/KMAITranslationWindowController.swift

@@ -117,9 +117,11 @@ class KMAITranslationWindowController: NSWindowController {
         if self.content.count > 0 {
             self.fromContentTextField.stringValue = self.content
             
-            self.translateBox.fillColor = NSColor(hex: "#1770F4")
-            self.translateLabel.textColor = NSColor(hex: "#FFFFFF")
-            self.state = .CanTranslate
+            if self.content.count > 150 {
+                self.state = .Exceed
+            } else {
+                self.state = .CanTranslate
+            }
         }
     }