Browse Source

tweak alignment so that verified icon is centered

cyberta 2 năm trước cách đây
mục cha
commit
57a0849526
1 tập tin đã thay đổi với 10 bổ sung3 xóa
  1. 10 3
      deltachat-ios/View/ContactCell.swift

+ 10 - 3
deltachat-ios/View/ContactCell.swift

@@ -25,9 +25,16 @@ class ContactCell: UITableViewCell {
     private let imgSize: CGFloat = 20
 
     lazy var toplineStackView: UIStackView = {
-        let stackView = UIStackView(arrangedSubviews: [titleLabel, verifiedIndicator, spacerView, mutedIndicator, pinnedIndicator, timeLabel, locationStreamingIndicator])
+        let stackView = UIStackView(arrangedSubviews: [
+            titleLabel,
+            verifiedIndicator,
+            spacerView,
+            mutedIndicator,
+            pinnedIndicator,
+            timeLabel,
+            locationStreamingIndicator])
         stackView.axis = .horizontal
-        stackView.alignment = .firstBaseline
+        stackView.alignment = .center
         stackView.spacing = 4
         return stackView
     }()
@@ -235,7 +242,7 @@ class ContactCell: UITableViewCell {
         verticalStackView.axis = .vertical
 
         toplineStackView.addConstraints([
-            verifiedIndicator.constraintHeightTo(titleLabel.font.pointSize * 0.95),
+            verifiedIndicator.constraintHeightTo(titleLabel.font.pointSize * 0.9),
             verifiedIndicator.widthAnchor.constraint(equalTo: verifiedIndicator.heightAnchor),
             pinnedIndicator.constraintHeightTo(titleLabel.font.pointSize * 1.2),
             mutedIndicator.constraintHeightTo(titleLabel.font.pointSize * 1.2),