]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
macOS: Fix editor scrolling
authorRoopesh Chander <roop@roopc.net>
Fri, 11 Jan 2019 11:17:20 +0000 (16:47 +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 b818d9f21ef9653a39d36f7f20a7bdc723546757..4edb17a2aa6c1fe1b6e27f8282bbd3a0414a524e 100644 (file)
@@ -28,8 +28,9 @@ class TunnelEditViewController: NSViewController {
         let minHeight: CGFloat = 310
         textView.minSize = NSSize(width: 0, height: minHeight)
         textView.maxSize = NSSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)
-        textView.autoresizingMask = [.width, .height]
-        textView.isHorizontallyResizable = true
+        textView.autoresizingMask = [.width] // Width should be based on superview width
+        textView.isHorizontallyResizable = false // Width shouldn't be based on content
+        textView.isVerticallyResizable = true // Height should be based on content
         if let textContainer = textView.textContainer {
             textContainer.size = NSSize(width: minWidth, height: CGFloat.greatestFiniteMagnitude)
             textContainer.widthTracksTextView = true