diff options
author | Roopesh Chander <roop@roopc.net> | 2019-01-03 19:34:28 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-01-14 14:52:31 +0530 |
commit | 60e18dfdd56700dffe67c58ed43b53c5c122243e (patch) | |
tree | 47e96de59a40ba2b2509242d096869e19fdd16ca /WireGuard/WireGuard/UI | |
parent | macOS: Manage tunnels: Show status checkbox and edit button (diff) | |
download | wireguard-apple-60e18dfdd56700dffe67c58ed43b53c5c122243e.tar.xz wireguard-apple-60e18dfdd56700dffe67c58ed43b53c5c122243e.zip |
macOS: Manage tunnels: Add a box around the detail view
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift index fc716ef..9ca9536 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift @@ -63,6 +63,13 @@ class TunnelDetailTableViewController: NSViewController { return button }() + let box: NSBox = { + let box = NSBox() + box.titlePosition = .noTitle + box.fillColor = .unemphasizedSelectedContentBackgroundColor + return box + }() + let tunnelsManager: TunnelsManager let tunnel: TunnelContainer var tunnelViewModel: TunnelViewModel { @@ -111,9 +118,11 @@ class TunnelDetailTableViewController: NSViewController { let containerView = NSView() let bottomControlsContainer = NSLayoutGuide() containerView.addLayoutGuide(bottomControlsContainer) + containerView.addSubview(box) containerView.addSubview(scrollView) containerView.addSubview(statusCheckbox) containerView.addSubview(editButton) + box.translatesAutoresizingMaskIntoConstraints = false scrollView.translatesAutoresizingMaskIntoConstraints = false statusCheckbox.translatesAutoresizingMaskIntoConstraints = false editButton.translatesAutoresizingMaskIntoConstraints = false @@ -133,6 +142,13 @@ class TunnelDetailTableViewController: NSViewController { editButton.centerYAnchor.constraint(equalTo: bottomControlsContainer.centerYAnchor) ]) + NSLayoutConstraint.activate([ + scrollView.topAnchor.constraint(equalTo: box.topAnchor), + scrollView.bottomAnchor.constraint(equalTo: box.bottomAnchor), + scrollView.leadingAnchor.constraint(equalTo: box.leadingAnchor), + scrollView.trailingAnchor.constraint(equalTo: box.trailingAnchor) + ]) + view = containerView } |