|
@@ -401,8 +401,15 @@ class KMSelectCell: NSTextFieldCell {
|
|
|
createFilePopover.behavior = .semitransient
|
|
|
createFilePopover.setValue(true, forKey: "shouldHideAnchor")
|
|
|
createFilePopover.show(relativeTo: CGRect(x: view.bounds.origin.x, y: 10, width: view.bounds.size.width, height: view.bounds.size.height), of: view, preferredEdge: .minY)
|
|
|
+ var width = mainBox.frame.width
|
|
|
+ for i in items {
|
|
|
+ let w = i.getTextRectSize(font: .systemFont(ofSize: 14.0), size: CGSize(width: CGFloat(MAXFLOAT), height: 32.0)).width+12*2
|
|
|
+ if width < w {
|
|
|
+ width = w
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- vc.customBoxWidthLayoutConstraint.constant = mainBox.frame.width
|
|
|
+ vc.customBoxWidthLayoutConstraint.constant = width
|
|
|
vc.downCallback = {(downEntered: Bool, count: String) -> Void in
|
|
|
if downEntered {
|
|
|
self.stringValue = count
|