瀏覽代碼

enlarge profile action buttons (#1705)

this makes the 'search' and 'mute' buttons a bit larger,
so that they're easier to tap
and also easier to recognize as a button at all
(not only a state icon)
bjoern 2 年之前
父節點
當前提交
5471dc05b5
共有 1 個文件被更改,包括 11 次插入7 次删除
  1. 11 7
      deltachat-ios/View/ContactDetailHeader.swift

+ 11 - 7
deltachat-ios/View/ContactDetailHeader.swift

@@ -48,13 +48,13 @@ class ContactDetailHeader: UIView {
         button.contentVerticalAlignment = .fill
         button.contentVerticalAlignment = .fill
         button.contentHorizontalAlignment = .fill
         button.contentHorizontalAlignment = .fill
         button.contentMode = .scaleAspectFit
         button.contentMode = .scaleAspectFit
-        button.imageEdgeInsets = UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)
-        button.layer.cornerRadius = 16
+        button.imageEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
+        button.layer.cornerRadius = 20
         button.layer.borderColor = DcColors.colorDisabled.cgColor
         button.layer.borderColor = DcColors.colorDisabled.cgColor
         button.layer.borderWidth = 1
         button.layer.borderWidth = 1
         button.layer.masksToBounds = true
         button.layer.masksToBounds = true
-        button.constraintHeightTo(32).isActive = true
-        button.constraintWidthTo(32).isActive = true
+        button.constraintHeightTo(40).isActive = true
+        button.constraintWidthTo(40).isActive = true
         return button
         return button
     }()
     }()
 
 
@@ -64,12 +64,16 @@ class ContactDetailHeader: UIView {
         button.addTarget(self, action: #selector(muteBtnTapped), for: .touchUpInside)
         button.addTarget(self, action: #selector(muteBtnTapped), for: .touchUpInside)
         button.backgroundColor = DcColors.profileCellBackgroundColor
         button.backgroundColor = DcColors.profileCellBackgroundColor
         button.setImage(UIImage(named: "volume_on")?.sd_tintedImage(with: .systemBlue), for: .normal)
         button.setImage(UIImage(named: "volume_on")?.sd_tintedImage(with: .systemBlue), for: .normal)
-        button.layer.cornerRadius = 16
+        button.contentVerticalAlignment = .fill
+        button.contentHorizontalAlignment = .fill
+        button.contentMode = .scaleAspectFit
+        button.imageEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
+        button.layer.cornerRadius = 20
         button.layer.borderColor = DcColors.colorDisabled.cgColor
         button.layer.borderColor = DcColors.colorDisabled.cgColor
         button.layer.borderWidth = 1
         button.layer.borderWidth = 1
         button.layer.masksToBounds = true
         button.layer.masksToBounds = true
-        button.constraintHeightTo(32).isActive = true
-        button.constraintWidthTo(32).isActive = true
+        button.constraintHeightTo(40).isActive = true
+        button.constraintWidthTo(40).isActive = true
         return button
         return button
     }()
     }()