diff options
author | 2019-01-17 14:20:09 +0530 | |
---|---|---|
committer | 2019-01-17 14:20:09 +0530 | |
commit | 796342ddecedbb31951d765452f947c90d1b7040 (patch) | |
tree | 78769a627c4d74243955e36b0e4b1862db7c22e0 | |
parent | macOS: Update copyright year (diff) | |
download | wireguard-apple-796342ddecedbb31951d765452f947c90d1b7040.tar.xz wireguard-apple-796342ddecedbb31951d765452f947c90d1b7040.zip |
macOS: Fix autolayout errors on Add Empty Tunnel
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift index 1ca6dc3..7d0d202 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift @@ -25,7 +25,7 @@ class TunnelEditViewController: NSViewController { let textView: ConfTextView = { let textView = ConfTextView() let minWidth: CGFloat = 120 - let minHeight: CGFloat = 60 + let minHeight: CGFloat = 0 textView.minSize = NSSize(width: 0, height: minHeight) textView.maxSize = NSSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude) textView.autoresizingMask = [.width] // Width should be based on superview width @@ -124,10 +124,7 @@ class TunnelEditViewController: NSViewController { // Creating a new tunnel let privateKey = Curve25519.generatePrivateKey() let publicKey = Curve25519.generatePublicKey(fromPrivateKey: privateKey) - let bootstrappingText = """ - [Interface] - PrivateKey = \(privateKey.base64EncodedString()) - """ + let bootstrappingText = "[Interface]\nPrivateKey = \(privateKey.base64EncodedString())\n" publicKeyRow.value = publicKey.base64EncodedString() textView.string = bootstrappingText selectedActivateOnDemandOption = .none |