123456789101112131415161718192021222324252627282930313233 |
- //
- // KMPreferenceStepper.swift
- // PDF Reader Pro
- //
- // Created by tangchao on 2023/2/3.
- //
- import Cocoa
- class KMPreferenceStepper: KMWatermarkAdjectiveStepper {
-
- override func initSubViews() {
- super.initSubViews()
-
- self.textField.backgroundColor = NSColor.white
- self.textField.isBordered = false
- }
- override func layout() {
- super.layout()
-
- let width: CGFloat = NSWidth(self.bounds)
- let height: CGFloat = NSHeight(self.bounds)
-
- let stepperWidth: CGFloat = 15
- stepper.frame = NSMakeRect(width-stepperWidth,0, stepperWidth, height)
-
- let textFieldX: CGFloat = 4
- let textFieldHeight: CGFloat = 20
- textField.frame = NSMakeRect(textFieldX, (height-textFieldHeight)*0.5, width-stepperWidth-textFieldX, textFieldHeight)
- }
-
- }
|