KMBackgroundOutsideView.swift 799 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // KMBackgroundOutsideView.swift
  3. // PDF Master
  4. //
  5. // Created by tangchao on 2022/12/25.
  6. //
  7. import Cocoa
  8. class KMBackgroundOutsideView: KMWatermarkAdjectiveOutsideView {
  9. override init(frame frameRect: NSRect) {
  10. super.init(frame: frameRect)
  11. self.pageAboveComboBox.isHidden = true
  12. }
  13. required init?(coder: NSCoder) {
  14. super.init(coder: coder)
  15. }
  16. override func layout() {
  17. super.layout()
  18. let width: CGFloat = NSWidth(self.bounds)
  19. let leftMargin: CGFloat = 16
  20. self.pageTargetScale.frame = NSMakeRect(leftMargin, self.rotateButton.frame.maxY+10, width-2*leftMargin, 16)
  21. self.pageTargetScaleComboBox.frame = NSMakeRect(leftMargin, self.pageTargetScale.frame.maxY+10, 100, 22)
  22. }
  23. }