瀏覽代碼

reduce cell height

cyberta 2 年之前
父節點
當前提交
ee49dbd6e7
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      deltachat-ios/Controller/AccountSwitchViewController.swift

+ 5 - 5
deltachat-ios/Controller/AccountSwitchViewController.swift

@@ -190,11 +190,11 @@ class AccountCell: UITableViewCell {
 
 
     static let reuseIdentifier = "accountCell_reuse_identifier"
     static let reuseIdentifier = "accountCell_reuse_identifier"
     static var cellHeight: CGFloat {
     static var cellHeight: CGFloat {
-        let textHeight = UIFont.preferredFont(forTextStyle: .headline).pointSize + UIFont.preferredFont(forTextStyle: .subheadline).pointSize + 24
-        if textHeight > 74.5 {
+        let textHeight = UIFont.preferredFont(forTextStyle: .body).pointSize + 24
+        if textHeight > 54 {
             return textHeight
             return textHeight
         }
         }
-        return 74.5
+        return 54
     }
     }
 
 
     var isLargeText: Bool {
     var isLargeText: Bool {
@@ -202,7 +202,7 @@ class AccountCell: UITableViewCell {
     }
     }
 
 
     lazy var accountAvatar: InitialsBadge = {
     lazy var accountAvatar: InitialsBadge = {
-        let avatar = InitialsBadge(size: 52, accessibilityLabel: "")
+        let avatar = InitialsBadge(size: 37, accessibilityLabel: "")
         return avatar
         return avatar
     }()
     }()
 
 
@@ -242,7 +242,7 @@ class AccountCell: UITableViewCell {
             accountAvatar.constraintCenterYTo(contentView),
             accountAvatar.constraintCenterYTo(contentView),
             accountAvatar.constraintAlignLeadingToAnchor(margins.leadingAnchor),
             accountAvatar.constraintAlignLeadingToAnchor(margins.leadingAnchor),
             accountName.constraintAlignTopToAnchor(margins.topAnchor),
             accountName.constraintAlignTopToAnchor(margins.topAnchor),
-            accountName.constraintToTrailingOf(accountAvatar, paddingLeading: 14),
+            accountName.constraintToTrailingOf(accountAvatar, paddingLeading: 20),
             accountName.constraintAlignBottomToAnchor(margins.bottomAnchor),
             accountName.constraintAlignBottomToAnchor(margins.bottomAnchor),
             accountName.constraintAlignTrailingToAnchor(margins.trailingAnchor, paddingTrailing: 32, priority: .defaultLow),
             accountName.constraintAlignTrailingToAnchor(margins.trailingAnchor, paddingTrailing: 32, priority: .defaultLow),
             stateIndicator.constraintCenterYTo(contentView),
             stateIndicator.constraintCenterYTo(contentView),