Преглед на файлове

【菜单栏】PDF - 高亮Form表单域 和 高亮链接,如果有被勾选,前面需要显示✅

liujiajie преди 10 месеца
родител
ревизия
b451803c24
променени са 1 файла, в които са добавени 14 реда и са изтрити 0 реда
  1. 14 0
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

+ 14 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -1461,6 +1461,20 @@ extension KMMainViewController: NSMenuItemValidation, NSMenuDelegate {
             }
         }
         
+        if menuItem.action == #selector(highlightFormFiled) {
+            let enabled = CPDFKitConfig.sharedInstance().enableFormFieldHighlight()
+            menuItem.state = enabled ? .on : .off
+            
+            return true
+        }
+        
+        if menuItem.action == #selector(highlightLinks) {
+            let enabled = CPDFKitConfig.sharedInstance().enableLinkFieldHighlight()
+            menuItem.state = enabled ? .on : .off
+            
+            return true
+        }
+        
         guard let action = menuItem.action else {
             return false
         }