]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
macOS: To set default size, change frame instead of min size
authorRoopesh Chander <roop@roopc.net>
Fri, 11 Jan 2019 11:21:40 +0000 (16:51 +0530)
committerRoopesh Chander <roop@roopc.net>
Mon, 14 Jan 2019 09:22:37 +0000 (14:52 +0530)
Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift

index 4edb17a2aa6c1fe1b6e27f8282bbd3a0414a524e..2a5af0128efc749ff082c6f0cb02aa24a216e1c2 100644 (file)
@@ -24,8 +24,8 @@ class TunnelEditViewController: NSViewController {
 
     let textView: ConfTextView = {
         let textView = ConfTextView()
-        let minWidth: CGFloat = 550
-        let minHeight: CGFloat = 310
+        let minWidth: CGFloat = 120
+        let minHeight: CGFloat = 60
         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
@@ -172,7 +172,7 @@ class TunnelEditViewController: NSViewController {
             containerView.widthAnchor.constraint(greaterThanOrEqualToConstant: 180),
             containerView.heightAnchor.constraint(greaterThanOrEqualToConstant: 240)
         ])
-        containerView.frame = NSRect(x: 0, y: 0, width: 480, height: 320)
+        containerView.frame = NSRect(x: 0, y: 0, width: 600, height: 480)
 
         self.view = containerView
     }