KMConvertPPTsSettingView.swift 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // KMConvertPPTsSettingView.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by tangchao on 2022/12/6.
  6. //
  7. import KMComponentLibrary
  8. class KMConvertPPTsSettingView: KMConvertSettingView {
  9. @IBOutlet weak var ocrBox: NSBox!
  10. @IBOutlet weak var pageRangeBox: NSBox!
  11. override func initSubViews() {
  12. super.initSubViews()
  13. self.tipView?.km_add_left_constraint(constant: 8)
  14. self.tipView?.km_add_top_constraint(equalTo: self.pageRangeBox, attribute: .bottom, constant: -5)
  15. self.tipView?.km_add_right_constraint()
  16. self.tipView?.km_add_height_constraint(constant: 16+20+16)
  17. }
  18. override func viewDidMoveToWindow() {
  19. super.viewDidMoveToWindow()
  20. if (self.ocrItemView == nil) {
  21. self.ocrItemView = KMConvertOCRSettingItemView.createFromNib()
  22. self.ocrBox.contentView = self.ocrItemView
  23. self.ocrItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
  24. self.updateViewColor()
  25. }
  26. self.ocrItemView?.languageIndex = self.ocrLanuguageIndex
  27. if (self.pageRangeItemView == nil) {
  28. self.pageRangeItemView = KMConvertPageRangeSettingItemView.createFromNib()
  29. self.pageRangeBox.contentView = self.pageRangeItemView
  30. self.pageRangeItemView?.titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
  31. self.updateViewColor()
  32. }
  33. self.pageRangeItemView?.isHidden = self.isBatch
  34. }
  35. override func updateViewColor() {
  36. super.updateViewColor()
  37. }
  38. }