Browse Source

【Form表单】提示语UI兼容问题,打开属性栏后也存在兼容问题 -- 修复

lizhe 11 months ago
parent
commit
dd765badc8

+ 3 - 2
PDF Office/PDF Master/Class/PDFWindowController/Form/AlertView/KMFormAlertView.swift

@@ -97,9 +97,10 @@ class KMFormAlertView: KMBaseXibView {
             if isContainsForm {
                 self.type = .highlightForm
                 DispatchQueue.main.async {
-                    let top = 40
-//                    self.pdfView?.document.permissionsStatus != .owner ? 80.5 : 40
+//                    var top = 40
+                    let top = self.pdfView?.document.permissionsStatus != .owner ? 80.5 : 40
                     self.frame = NSMakeRect(0, pdfView.frame.size.height - CGFloat(top), pdfView.frame.size.width, 40)
+                    self.autoresizingMask = [.width, .minYMargin]
                     pdfView.addSubview(self)
                     self.textLabel.stringValue = NSLocalizedString("This document contains interactive form fields.", comment: "")
                     let highlightFormFiled = UserDefaults.standard.bool(forKey: "kPDFViewHighlightFormFiledKey")

+ 2 - 0
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarController.swift

@@ -206,6 +206,7 @@ class KMToolbarController: NSViewController {
             } else {
                 _toolbarType = newValue
             }
+            mainToolBarView?.toolbar?.isHidden = false
             secondaryToolBarBox.isHidden = true
             secondaryToolBarHeight.constant = 51
             let mainToolbarH = self.mainToolBarisVisable ? Self.mainToolBarHeight : 0
@@ -220,6 +221,7 @@ class KMToolbarController: NSViewController {
                     mainToolBarHeight.constant = 0
                     bottomOffset.constant = 0
                     childToolBarBox.isHidden = true
+                    mainToolBarView?.toolbar?.isHidden = true
                     self.delegate?.toolbarController?(self, heightOffsetChange: 0, animated: false)
                 }
             } else {