mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
e8a29b1a29
The internal parser is retro compatible with old Clover revisions since r3250. This is possible because a check for the existence of any variable inside SETTING_DATA structure is performed before the call. Variables are all accessed using the label property of the Mirror class, so as a string.
52 lines
1.2 KiB
Swift
52 lines
1.2 KiB
Swift
//
|
|
// FixedWidthViews.swift
|
|
// Clover
|
|
//
|
|
// Created by vector sigma on 05/11/2019.
|
|
// Copyright © 2019 CloverHackyColor. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
|
|
final class FWPopUpButton: NSPopUpButton {
|
|
private var pfixedWidth : CGFloat = 50
|
|
@IBInspectable var fixedWidth: CGFloat {
|
|
get {
|
|
return self.pfixedWidth
|
|
} set {
|
|
self.pfixedWidth = newValue
|
|
}
|
|
}
|
|
override var intrinsicContentSize: NSSize {
|
|
return NSMakeSize(self.fixedWidth, super.intrinsicContentSize.height)
|
|
}
|
|
}
|
|
|
|
final class FWButton: NSButton {
|
|
private var pfixedWidth : CGFloat = 50
|
|
@IBInspectable var fixedWidth: CGFloat {
|
|
get {
|
|
return self.pfixedWidth
|
|
} set {
|
|
self.pfixedWidth = newValue
|
|
}
|
|
}
|
|
override var intrinsicContentSize: NSSize {
|
|
return NSMakeSize(self.fixedWidth, super.intrinsicContentSize.height)
|
|
}
|
|
}
|
|
|
|
final class FWTextField: NSTextField {
|
|
private var pfixedWidth : CGFloat = 50
|
|
@IBInspectable var fixedWidth: CGFloat {
|
|
get {
|
|
return self.pfixedWidth
|
|
} set {
|
|
self.pfixedWidth = newValue
|
|
}
|
|
}
|
|
override var intrinsicContentSize: NSSize {
|
|
return NSMakeSize(self.fixedWidth, super.intrinsicContentSize.height)
|
|
}
|
|
}
|