Contraint Changes

Fixes #2850
• #2634: resizing vertically downards (expanding) is smooth
This commit is contained in:
Stuart Breckenridge
2021-03-07 14:20:03 +08:00
parent f8ae8d2821
commit 8dc6e4e332
2 changed files with 16 additions and 12 deletions

View File

@@ -90,13 +90,7 @@ final class DetailWebViewController: NSViewController, WKUIDelegate {
// Use the safe area layout guides if they are available.
if #available(OSX 11.0, *) {
let constraints = [
webView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
webView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor),
webView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),
webView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),
]
NSLayoutConstraint.activate(constraints)
// These constraints have been removed as they were unsatisfyable after removing NSBox.
} else {
let constraints = [
webView.topAnchor.constraint(equalTo: view.topAnchor),