diff options
author | Roopesh Chander <roop@roopc.net> | 2019-01-11 16:47:20 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-01-14 14:52:37 +0530 |
commit | 96bd50504bad8becc3d4c12e29c292cbf49ddda2 (patch) | |
tree | 58377a0ce6042f52494746110e71af5eb200b4b8 /WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift | |
parent | Default view controller sizes (diff) | |
download | wireguard-apple-96bd50504bad8becc3d4c12e29c292cbf49ddda2.tar.xz wireguard-apple-96bd50504bad8becc3d4c12e29c292cbf49ddda2.zip |
macOS: Fix editor scrolling
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift index b818d9f..4edb17a 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift @@ -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 |