Răsfoiți Sursa

increase font size of fallback avatar

cyberta 5 ani în urmă
părinte
comite
a7ef2251f4

+ 1 - 0
deltachat-ios/Controller/ChatViewController.swift

@@ -233,6 +233,7 @@ class ChatViewController: MessagesViewController {
             badge =  InitialsBadge(image: image, size: 28)
         } else {
             badge =  InitialsBadge(name: chat.name, color: chat.color, size: 28)
+            badge.setLabelFont(UIFont.systemFont(ofSize: 14))
         }
         badge.setVerified(chat.isVerified)
         badge.accessibilityTraits = .button

+ 5 - 1
deltachat-ios/View/InitialsBadge.swift

@@ -7,7 +7,7 @@ class InitialsBadge: UIView {
 
     private var label: UILabel = {
         let label = UILabel()
-        label.adjustsFontSizeToFitWidth = true
+        label.font = UIFont.systemFont(ofSize: 18)
         label.textAlignment = NSTextAlignment.center
         label.textColor = UIColor.white
         label.translatesAutoresizingMaskIntoConstraints = false
@@ -86,6 +86,10 @@ class InitialsBadge: UIView {
         accessibilityLabel = "avatar \(name)"
     }
 
+    func setLabelFont(_ font: UIFont) {
+        label.font = font
+    }
+
     func setImage(_ image: UIImage, downscale: CGFloat? = nil) {
         var scale = downscale ?? 1
         if scale > 1 {