KMConvertPPTsSettingView.swift 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. }
  34. override func updateViewColor() {
  35. super.updateViewColor()
  36. }
  37. }