diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-07-08 15:44:29 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-07-19 10:49:00 +0200 |
| commit | fda131d31789bc0a4447ce9c6b99f5868228cf3d (patch) | |
| tree | e8f52b449b2504955ce0c9e2fd61dc203a27cdf8 | |
| parent | f3c78fd89f520178b7f21eff320e5e18d32b9ec7 (diff) | |
| download | mullvadvpn-fda131d31789bc0a4447ce9c6b99f5868228cf3d.tar.xz mullvadvpn-fda131d31789bc0a4447ce9c6b99f5868228cf3d.zip | |
UIMetrics: add interButtonSpacing
| -rw-r--r-- | ios/MullvadVPN/ConnectMainContentView.swift | 2 | ||||
| -rw-r--r-- | ios/MullvadVPN/UIMetrics.swift | 3 | ||||
| -rw-r--r-- | ios/MullvadVPN/WireguardKeysContentView.swift | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/ios/MullvadVPN/ConnectMainContentView.swift b/ios/MullvadVPN/ConnectMainContentView.swift index 851ddfbad3..86464a45a3 100644 --- a/ios/MullvadVPN/ConnectMainContentView.swift +++ b/ios/MullvadVPN/ConnectMainContentView.swift @@ -40,7 +40,7 @@ class ConnectMainContentView: UIView { lazy var buttonsStackView: UIStackView = { let stackView = UIStackView() - stackView.spacing = 16 + stackView.spacing = UIMetrics.interButtonSpacing stackView.axis = .vertical stackView.translatesAutoresizingMaskIntoConstraints = false return stackView diff --git a/ios/MullvadVPN/UIMetrics.swift b/ios/MullvadVPN/UIMetrics.swift index fd7b80728b..c30b44e291 100644 --- a/ios/MullvadVPN/UIMetrics.swift +++ b/ios/MullvadVPN/UIMetrics.swift @@ -18,6 +18,9 @@ extension UIMetrics { /// Layout margins for in-app notification banner presentation static var inAppBannerNotificationLayoutMargins = UIEdgeInsets(top: 16, left: 24, bottom: 16, right: 24) + /// Spacing used in stack views of buttons + static var interButtonSpacing: CGFloat = 16 + /// Maximum width of the split view content container on iPad static var maximumSplitViewContentContainerWidth: CGFloat = 810 * 0.7 diff --git a/ios/MullvadVPN/WireguardKeysContentView.swift b/ios/MullvadVPN/WireguardKeysContentView.swift index 298192147e..2db0ebf4ca 100644 --- a/ios/MullvadVPN/WireguardKeysContentView.swift +++ b/ios/MullvadVPN/WireguardKeysContentView.swift @@ -62,7 +62,7 @@ class WireguardKeysContentView: UIView { let stackView = UIStackView(arrangedSubviews: [regenerateKeyButton, verifyKeyButton]) stackView.translatesAutoresizingMaskIntoConstraints = false stackView.axis = .vertical - stackView.spacing = UIMetrics.contentLayoutMargins.top + stackView.spacing = UIMetrics.interButtonSpacing return stackView }() |
