aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-13 05:15:50 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-13 05:22:13 +0100
commitecbab37e0e7ef62c01d239211d08214e8d4a509f (patch)
treeec95c7ec3826b43530d53e16eaa79fba117512c7 /WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
parentFixed hacky logo display for settings (diff)
downloadwireguard-apple-ecbab37e0e7ef62c01d239211d08214e8d4a509f.tar.xz
wireguard-apple-ecbab37e0e7ef62c01d239211d08214e8d4a509f.zip
Settings: better padding calculation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
index 346f66d..fe276b1 100644
--- a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
@@ -48,9 +48,9 @@ class SettingsTableViewController: UITableViewController {
logo.contentMode = .scaleAspectFit
var height = self.tableView.estimatedRowHeight * 1.5
var width = height * image.size.width / image.size.height
- let minScreenDimension = min(UIScreen.main.bounds.size.width, UIScreen.main.bounds.size.height)
- if width > minScreenDimension - 30 {
- width = minScreenDimension - 30
+ let minScreenDimension = min(UIScreen.main.bounds.size.width, UIScreen.main.bounds.size.height) - max(self.tableView.layoutMargins.right, CGFloat(10))
+ if width > minScreenDimension {
+ width = minScreenDimension
height = width * image.size.height / image.size.width
}
logo.frame = CGRect(x: 0, y: 0, width: width, height: height)