aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/WireGuard/UI')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift16
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
}