@@ -15,8 +15,8 @@ final class IssueManagingActionCell: UICollectionViewCell, ListBindable {
1515 private let label = UILabel ( )
1616 private let imageView = UIImageView ( )
1717
18- static let iconHeight = Styles . Sizes. buttonIcon. height + Styles. Sizes. rowSpacing * 3
19- static let height = ceil ( iconHeight + Styles. Sizes. rowSpacing * 2.5 + Styles. Text. secondary. size )
18+ static let iconHeight = Styles . Sizes. buttonIcon. height + Styles. Sizes. rowSpacing * 2
19+ static let height = ceil ( iconHeight + Styles. Sizes. rowSpacing * 2.5 + Styles. Text. secondary. preferredFont . lineHeight )
2020
2121 override init ( frame: CGRect ) {
2222 super. init ( frame: frame)
@@ -28,35 +28,28 @@ final class IssueManagingActionCell: UICollectionViewCell, ListBindable {
2828 contentView. layer. cornerRadius = Styles . Sizes. cardCornerRadius
2929
3030 let iconSize = IssueManagingActionCell . iconHeight
31- imageView. contentMode = . center
31+ imageView. contentMode = . bottom
3232 imageView. clipsToBounds = true
3333 contentView. addSubview ( imageView)
3434 imageView. snp. makeConstraints { make in
3535 make. size. equalTo ( CGSize ( width: iconSize, height: iconSize) )
36- make. centerX. equalTo ( contentView )
37- make. top . equalTo ( contentView ) . offset ( Styles . Sizes . rowSpacing / 2 )
36+ make. centerX. equalToSuperview ( )
37+ make. centerY . equalToSuperview ( ) . offset ( - iconSize / 2 )
3838 }
3939
4040 label. textColor = tint
4141 label. font = Styles . Text. secondaryBold. preferredFont
4242 contentView. addSubview ( label)
4343 label. snp. makeConstraints { make in
4444 make. centerX. equalTo ( imageView)
45- make. top. equalTo ( imageView. snp. bottom) . offset ( - Styles. Sizes. rowSpacing)
45+ make. top. equalTo ( imageView. snp. bottom) . offset ( Styles . Sizes. rowSpacing/ 2 + 2 )
4646 }
4747 }
4848
4949 required init ? ( coder aDecoder: NSCoder ) {
5050 fatalError ( " init(coder:) has not been implemented " )
5151 }
5252
53- override func layoutSubviews( ) {
54- super. layoutSubviews ( )
55- let height = bounds. height - Styles. Sizes. rowSpacing
56- contentView. frame = CGRect ( x: 0 , y: 0 , width: height, height: height)
57- contentView. center = CGPoint ( x: bounds. width/ 2 , y: bounds. height/ 2 )
58- }
59-
6053 override var isSelected : Bool {
6154 didSet {
6255 highlight ( isSelected)
0 commit comments