PathControl // Fix constraint behavior in SwiftUI.
This commit is contained in:
parent
00da1266f1
commit
4583bcc562
|
@ -231,6 +231,9 @@ public struct PathControl: NSViewRepresentable {
|
||||||
pathCtl.backgroundColor = .controlBackgroundColor
|
pathCtl.backgroundColor = .controlBackgroundColor
|
||||||
pathCtl.target = context.coordinator
|
pathCtl.target = context.coordinator
|
||||||
pathCtl.doubleAction = #selector(Coordinator.action)
|
pathCtl.doubleAction = #selector(Coordinator.action)
|
||||||
|
pathCtl.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
||||||
|
pathCtl.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||||
|
pathCtl.heightAnchor.constraint(equalToConstant: NSFont.smallSystemFontSize * 2).isActive = true
|
||||||
return pathCtl
|
return pathCtl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue