Bladeren bron

compute default cell height depending on UIFont size, as an intermediate step until we remove the constant completely

cyberta 5 jaren geleden
bovenliggende
commit
8679ce99be
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6 2
      deltachat-ios/Helper/Constants.swift

+ 6 - 2
deltachat-ios/Helper/Constants.swift

@@ -13,8 +13,12 @@ struct Constants {
 
     static let notificationIdentifier = "deltachat-ios-local-notifications"
 
-    static let defaultCellHeight: CGFloat = 48
-    static let defaultHeaderHeight: CGFloat = 20
+    static var defaultCellHeight: CGFloat {
+        return UIFont.preferredFont(forTextStyle: .body).pointSize + 32
+    }
+    static var defaultHeaderHeight: CGFloat {
+        return UIFont.preferredFont(forTextStyle: .caption1).pointSize + 12
+    }
 
 }