Browse Source

【fix】mac电脑点如图按钮没反应

tangchao 3 months ago
parent
commit
4c89c3f742

+ 17 - 0
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateConvertViewController.swift

@@ -66,6 +66,15 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
     
     private var ocrLanguage_: COCRLanguage = .english
     
+    private lazy var unlimitedConvertButton: NSButton = {
+        let view = NSButton()
+        view.isBordered = false
+        view.title = ""
+        view.target = self
+        view.action = #selector(unlimitedConvertAction)
+        return view
+    }()
+    
     deinit {
         NotificationCenter.default.removeObserver(self)
     }
@@ -342,6 +351,10 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
         ocrLanguageBox.isEnabled = false
         ocrButton.state = .off
         
+        self.detailInfoBox.contentView?.addSubview(self.unlimitedConvertButton)
+        self.unlimitedConvertButton.frame = self.detailInfoBox.contentView?.bounds ?? .zero
+        self.unlimitedConvertButton.autoresizingMask = [.width, .height]
+        
         self.updateViewColor()
        
         NotificationCenter.default.addObserver(self, selector: #selector(batchFilesCountNotification(notification:)), name: Notification.Name(rawValue: "KMBatchFilesCountNotification"), object: nil)
@@ -666,6 +679,10 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
         transform(withString: self.allContentMenu.selectedItem!.title)
     }
     
+    @objc func unlimitedConvertAction() {
+        moreConvertInfoAction()
+    }
+    
     func intConvertType(num: Int) -> KMConvertWithPDFType {
         var type: KMConvertWithPDFType?
         switch num {