]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Settings: limit size of logo
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 3 Nov 2018 18:12:04 +0000 (19:12 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 3 Nov 2018 18:20:21 +0000 (19:20 +0100)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift

index b3d8c217bcffb1a461e1b19e635a0b5b11030829..acca64dd6ff71ba73a6fa3a93f3446a97f0d6df8 100644 (file)
@@ -165,7 +165,7 @@ extension SettingsTableViewController {
     override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
         guard (section == 1) else { return 0 }
         guard let imageSize = self.wireguardCaptionedImage?.size else { return 0 }
-        return (min(tableView.bounds.width, 480) / imageSize.width) * imageSize.height
+        return min(tableView.rowHeight * 1.5, (tableView.bounds.width / imageSize.width) * imageSize.height)
     }
 }