Переглянути джерело

synchronize color and size more to android and other online indicators (#1707)

some easy to target layout points:

- with the "connection view",
  we already have a green indicating sth. as "online", reuse that
- the size is a bit bigger, more matching to android
  and also more visible in the title bar (where the avatar is smaller)

maybe we can get online indicator also to the top-right corner,
maybe above the checkmark that could move a little bit to the left (always),
i was playing around with this and other ideas,
but that is maybe sth. for a subsequent pr. easy things first :)
bjoern 2 роки тому
батько
коміт
1465195179

+ 1 - 0
DcCore/DcCore/Helper/DcColors.swift

@@ -19,6 +19,7 @@ public struct DcColors {
     public static let profileCellBackgroundColor = UIColor.themeColor(light: white, dark: actionCellBackgroundDark)
     public static let chatBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
     public static let checkmarkGreen = UIColor.themeColor(light: UIColor.rgb(red: 112, green: 177, blue: 92))
+    public static let recentlySeenDot = UIColor(hexString: "34c759")
     public static let unreadBadge = UIColor(hexString: "3792fc")
     public static let defaultTextColor = UIColor.themeColor(light: .darkText, dark: .white)
     public static let grayTextColor = UIColor.themeColor(light: .darkGray, dark: coreDark05)

+ 4 - 4
DcCore/DcCore/Views/InitialsBadge.swift

@@ -40,7 +40,7 @@ public class InitialsBadge: UIView {
     private var recentlySeenView: UIView = {
         let view = UIView()
         view.translatesAutoresizingMaskIntoConstraints = false
-        view.backgroundColor = DcColors.checkmarkGreen
+        view.backgroundColor = DcColors.recentlySeenDot
         view.clipsToBounds = true
         view.isHidden = true
         return view
@@ -110,10 +110,10 @@ public class InitialsBadge: UIView {
                                   verifiedView.constraintAlignLeadingTo(self, paddingLeading: radius + verificationViewPadding),
                                   recentlySeenView.constraintAlignBottomTo(self),
                                   recentlySeenView.constraintAlignLeadingTo(self),
-                                  recentlySeenView.constraintHeightTo(radius / 2),
-                                  recentlySeenView.constraintWidthTo(radius / 2)
+                                  recentlySeenView.constraintHeightTo(radius * 0.6),
+                                  recentlySeenView.constraintWidthTo(radius * 0.6)
         ]
-        recentlySeenView.layer.cornerRadius = radius / 4
+        recentlySeenView.layer.cornerRadius = radius * 0.3
         addConstraints(imgViewConstraints)
     }