From 9fc4aa8a4073d15ef7c3cad89ee5d1d9bd1ac9d2 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 9 May 2023 14:39:15 -0400 Subject: [PATCH] Make various corners continuously rounded --- .../ComposeUI/Controllers/PollController.swift | 4 ++-- .../Duckable/DuckableContainerViewController.swift | 1 + .../Sources/TuskerComponents/AvatarImageView.swift | 2 +- .../Explore/FeaturedProfileCollectionViewCell.swift | 3 +++ .../SuggestedProfileCardCollectionViewCell.swift | 3 +++ .../TrendingLinkCardCollectionViewCell.swift | 1 + .../FastSwitchingAccountView.swift | 2 ++ .../ActionNotificationGroupCollectionViewCell.swift | 1 + .../FollowNotificationGroupCollectionViewCell.swift | 1 + ...ollowRequestNotificationCollectionViewCell.swift | 1 + .../Account Cell/AccountCollectionViewCell.swift | 1 + .../Views/Account Cell/AccountTableViewCell.swift | 1 + .../Account Detail/LargeAccountDetailView.swift | 1 + Tusker/Views/Attachments/AttachmentView.swift | 2 ++ .../Attachments/AttachmentsContainerView.swift | 13 +++++++++++++ Tusker/Views/Poll/PollOptionCheckboxView.swift | 1 + Tusker/Views/Poll/PollOptionView.swift | 2 ++ .../ProfileHeaderMovedOverlayView.swift | 1 + Tusker/Views/Profile Header/ProfileHeaderView.swift | 2 ++ .../ConversationMainStatusCollectionViewCell.swift | 1 + Tusker/Views/Status/StatusCardView.swift | 1 + .../Status/TimelineStatusCollectionViewCell.swift | 2 ++ 22 files changed, 44 insertions(+), 3 deletions(-) diff --git a/Packages/ComposeUI/Sources/ComposeUI/Controllers/PollController.swift b/Packages/ComposeUI/Sources/ComposeUI/Controllers/PollController.swift index d3d0fd48..712bc42b 100644 --- a/Packages/ComposeUI/Sources/ComposeUI/Controllers/PollController.swift +++ b/Packages/ComposeUI/Sources/ComposeUI/Controllers/PollController.swift @@ -120,8 +120,8 @@ class PollController: ViewController { } .padding(8) .background( - backgroundColor - .cornerRadius(10) + RoundedRectangle(cornerRadius: 10, style: .continuous) + .foregroundColor(backgroundColor) ) .onChange(of: controller.duration) { newValue in poll.duration = newValue.timeInterval diff --git a/Packages/Duckable/Sources/Duckable/DuckableContainerViewController.swift b/Packages/Duckable/Sources/Duckable/DuckableContainerViewController.swift index ff77ce37..ac79c333 100644 --- a/Packages/Duckable/Sources/Duckable/DuckableContainerViewController.swift +++ b/Packages/Duckable/Sources/Duckable/DuckableContainerViewController.swift @@ -155,6 +155,7 @@ public class DuckableContainerViewController: UIViewController, DuckableViewCont bottomConstraint.isActive = true child.view.layer.cornerRadius = duckedCornerRadius + child.view.layer.cornerCurve = .continuous child.view.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMaxYCorner] child.view.layer.masksToBounds = true } diff --git a/Packages/TuskerComponents/Sources/TuskerComponents/AvatarImageView.swift b/Packages/TuskerComponents/Sources/TuskerComponents/AvatarImageView.swift index d7d7a673..9674b04c 100644 --- a/Packages/TuskerComponents/Sources/TuskerComponents/AvatarImageView.swift +++ b/Packages/TuskerComponents/Sources/TuskerComponents/AvatarImageView.swift @@ -27,7 +27,7 @@ public struct AvatarImageView: View { imageView .resizable() .frame(width: size, height: size) - .cornerRadius(style.cornerRadiusFraction * size) + .clipShape(RoundedRectangle(cornerRadius: style.cornerRadiusFraction * size, style: .continuous)) .task { @MainActor in image = nil if let url { diff --git a/Tusker/Screens/Explore/FeaturedProfileCollectionViewCell.swift b/Tusker/Screens/Explore/FeaturedProfileCollectionViewCell.swift index 151ccce7..e2ad4656 100644 --- a/Tusker/Screens/Explore/FeaturedProfileCollectionViewCell.swift +++ b/Tusker/Screens/Explore/FeaturedProfileCollectionViewCell.swift @@ -27,7 +27,9 @@ class FeaturedProfileCollectionViewCell: UICollectionViewCell { super.awakeFromNib() avatarContainerView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadius(for: avatarContainerView) + avatarContainerView.layer.cornerCurve = .continuous avatarImageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadius(for: avatarImageView) + avatarImageView.layer.cornerCurve = .continuous displayNameLabel.font = UIFontMetrics(forTextStyle: .title1).scaledFont(for: .systemFont(ofSize: 20, weight: .semibold)) displayNameLabel.adjustsFontForContentSizeCategory = true @@ -41,6 +43,7 @@ class FeaturedProfileCollectionViewCell: UICollectionViewCell { backgroundColor = .clear clippingView.backgroundColor = .appBackground clippingView.layer.cornerRadius = 5 + clippingView.layer.cornerCurve = .continuous clippingView.layer.borderWidth = 1 clippingView.layer.masksToBounds = true layer.shadowOpacity = 0.2 diff --git a/Tusker/Screens/Explore/SuggestedProfileCardCollectionViewCell.swift b/Tusker/Screens/Explore/SuggestedProfileCardCollectionViewCell.swift index c880f865..f0de5531 100644 --- a/Tusker/Screens/Explore/SuggestedProfileCardCollectionViewCell.swift +++ b/Tusker/Screens/Explore/SuggestedProfileCardCollectionViewCell.swift @@ -36,14 +36,17 @@ class SuggestedProfileCardCollectionViewCell: UICollectionViewCell { layer.shadowOffset = .zero layer.masksToBounds = false contentView.layer.cornerRadius = 12.5 + contentView.layer.cornerCurve = .continuous contentView.backgroundColor = .appGroupedCellBackground updateLayerColors() headerImageView.cache = .headers avatarContainerView.layer.masksToBounds = true + avatarContainerView.layer.cornerCurve = .continuous avatarImageView.cache = .avatars avatarImageView.layer.masksToBounds = true + avatarImageView.layer.cornerCurve = .continuous displayNameLabel.font = UIFontMetrics(forTextStyle: .title1).scaledFont(for: .systemFont(ofSize: 24, weight: .semibold)) displayNameLabel.adjustsFontForContentSizeCategory = true diff --git a/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift b/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift index 1a88dec3..dffe8221 100644 --- a/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift +++ b/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift @@ -57,6 +57,7 @@ class TrendingLinkCardCollectionViewCell: UICollectionViewCell { layer.shadowOffset = .zero layer.masksToBounds = false contentView.layer.cornerRadius = 12.5 + contentView.layer.cornerCurve = .continuous contentView.backgroundColor = .appGroupedCellBackground updateLayerColors() diff --git a/Tusker/Screens/Fast Account Switcher/FastSwitchingAccountView.swift b/Tusker/Screens/Fast Account Switcher/FastSwitchingAccountView.swift index 7e04fbc3..e800ecbc 100644 --- a/Tusker/Screens/Fast Account Switcher/FastSwitchingAccountView.swift +++ b/Tusker/Screens/Fast Account Switcher/FastSwitchingAccountView.swift @@ -86,7 +86,9 @@ class FastSwitchingAccountView: UIView { avatarImageView.translatesAutoresizingMaskIntoConstraints = false avatarImageView.layer.masksToBounds = true avatarImageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 40 + avatarImageView.layer.cornerCurve = .continuous avatarImageView.image = UIImage(systemName: Preferences.shared.avatarStyle == .circle ? "person.crop.circle" : "person.crop.square") + // todo: this should really be fit, but somehow the image view ends up being 37pt tall? avatarImageView.contentMode = .scaleAspectFill addSubview(avatarImageView) diff --git a/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift b/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift index 9c117db0..da79272e 100644 --- a/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift +++ b/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift @@ -149,6 +149,7 @@ class ActionNotificationGroupCollectionViewCell: UICollectionViewListCell { imageView.contentMode = .scaleAspectFit imageView.layer.masksToBounds = true imageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 30 + imageView.layer.cornerCurve = .continuous avatarStack.addArrangedSubview(imageView) imageView.update(for: avatarURL) } diff --git a/Tusker/Screens/Notifications/FollowNotificationGroupCollectionViewCell.swift b/Tusker/Screens/Notifications/FollowNotificationGroupCollectionViewCell.swift index dfae5509..d79e3ff8 100644 --- a/Tusker/Screens/Notifications/FollowNotificationGroupCollectionViewCell.swift +++ b/Tusker/Screens/Notifications/FollowNotificationGroupCollectionViewCell.swift @@ -123,6 +123,7 @@ class FollowNotificationGroupCollectionViewCell: UICollectionViewListCell { let imageView = CachedImageView(cache: .avatars) imageView.layer.masksToBounds = true imageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 30 + imageView.layer.cornerCurve = .continuous imageView.update(for: avatarURL) avatarStack.addArrangedSubview(imageView) } diff --git a/Tusker/Screens/Notifications/FollowRequestNotificationCollectionViewCell.swift b/Tusker/Screens/Notifications/FollowRequestNotificationCollectionViewCell.swift index bc5ea80f..2b17f808 100644 --- a/Tusker/Screens/Notifications/FollowRequestNotificationCollectionViewCell.swift +++ b/Tusker/Screens/Notifications/FollowRequestNotificationCollectionViewCell.swift @@ -21,6 +21,7 @@ class FollowRequestNotificationCollectionViewCell: UICollectionViewListCell { private let avatarImageView = CachedImageView(cache: .avatars).configure { $0.layer.masksToBounds = true + $0.layer.cornerCurve = .continuous NSLayoutConstraint.activate([ $0.widthAnchor.constraint(equalTo: $0.heightAnchor), ]) diff --git a/Tusker/Views/Account Cell/AccountCollectionViewCell.swift b/Tusker/Views/Account Cell/AccountCollectionViewCell.swift index cb90f4c5..18c989f1 100644 --- a/Tusker/Views/Account Cell/AccountCollectionViewCell.swift +++ b/Tusker/Views/Account Cell/AccountCollectionViewCell.swift @@ -22,6 +22,7 @@ class AccountCollectionViewCell: UICollectionViewListCell { private let avatarImageView = CachedImageView(cache: .avatars).configure { $0.layer.masksToBounds = true + $0.layer.cornerCurve = .continuous NSLayoutConstraint.activate([ $0.widthAnchor.constraint(equalToConstant: 50), $0.heightAnchor.constraint(equalToConstant: 50), diff --git a/Tusker/Views/Account Cell/AccountTableViewCell.swift b/Tusker/Views/Account Cell/AccountTableViewCell.swift index 6039fb5a..e179e43a 100644 --- a/Tusker/Views/Account Cell/AccountTableViewCell.swift +++ b/Tusker/Views/Account Cell/AccountTableViewCell.swift @@ -28,6 +28,7 @@ class AccountTableViewCell: UITableViewCell { super.awakeFromNib() avatarImageView.layer.masksToBounds = true + avatarImageView.layer.cornerCurve = .continuous usernameLabel.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 15, weight: .light)) usernameLabel.adjustsFontForContentSizeCategory = true diff --git a/Tusker/Views/Account Detail/LargeAccountDetailView.swift b/Tusker/Views/Account Detail/LargeAccountDetailView.swift index f3e6f5c9..502f918d 100644 --- a/Tusker/Views/Account Detail/LargeAccountDetailView.swift +++ b/Tusker/Views/Account Detail/LargeAccountDetailView.swift @@ -22,6 +22,7 @@ class LargeAccountDetailView: UIView { avatarImageView.translatesAutoresizingMaskIntoConstraints = false avatarImageView.layer.masksToBounds = true + avatarImageView.layer.cornerCurve = .continuous addSubview(avatarImageView) displayNameLabel.translatesAutoresizingMaskIntoConstraints = false diff --git a/Tusker/Views/Attachments/AttachmentView.swift b/Tusker/Views/Attachments/AttachmentView.swift index 75e727a2..5cfeb23d 100644 --- a/Tusker/Views/Attachments/AttachmentView.swift +++ b/Tusker/Views/Attachments/AttachmentView.swift @@ -368,11 +368,13 @@ class AttachmentView: GIFImageView { let first = stack.arrangedSubviews.first! first.layer.masksToBounds = true first.layer.cornerRadius = 4 + first.layer.cornerCurve = .continuous if stack.arrangedSubviews.count > 1 { first.layer.maskedCorners = [.layerMinXMinYCorner, .layerMinXMaxYCorner] let last = stack.arrangedSubviews.last! last.layer.masksToBounds = true last.layer.cornerRadius = 4 + last.layer.cornerCurve = .continuous last.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMaxXMaxYCorner] } diff --git a/Tusker/Views/Attachments/AttachmentsContainerView.swift b/Tusker/Views/Attachments/AttachmentsContainerView.swift index c5f02d54..9a64e488 100644 --- a/Tusker/Views/Attachments/AttachmentsContainerView.swift +++ b/Tusker/Views/Attachments/AttachmentsContainerView.swift @@ -85,6 +85,7 @@ class AttachmentsContainerView: UIView { case 1: let attachmentView = createAttachmentView(index: 0, hSize: .full, vSize: .full) attachmentView.layer.cornerRadius = 5 + attachmentView.layer.cornerCurve = .continuous attachmentView.layer.masksToBounds = true fillView(attachmentView) sendSubviewToBack(attachmentView) @@ -95,10 +96,12 @@ class AttachmentsContainerView: UIView { case 2: let left = createAttachmentView(index: 0, hSize: .half, vSize: .full) left.layer.cornerRadius = 5 + left.layer.cornerCurve = .continuous left.layer.maskedCorners = [.layerMinXMinYCorner, .layerMinXMaxYCorner] left.layer.masksToBounds = true let right = createAttachmentView(index: 1, hSize: .half, vSize: .full) right.layer.cornerRadius = 5 + right.layer.cornerCurve = .continuous right.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMaxXMaxYCorner] right.layer.masksToBounds = true let stack = createAttachmentsStack(axis: .horizontal, arrangedSubviews: [ @@ -116,14 +119,17 @@ class AttachmentsContainerView: UIView { case 3: let left = createAttachmentView(index: 0, hSize: .half, vSize: .full) left.layer.cornerRadius = 5 + left.layer.cornerCurve = .continuous left.layer.maskedCorners = [.layerMinXMinYCorner, .layerMinXMaxYCorner] left.layer.masksToBounds = true let topRight = createAttachmentView(index: 1, hSize: .half, vSize: .half) topRight.layer.cornerRadius = 5 + topRight.layer.cornerCurve = .continuous topRight.layer.maskedCorners = .layerMaxXMinYCorner topRight.layer.masksToBounds = true let bottomRight = createAttachmentView(index: 2, hSize: .half, vSize: .half) bottomRight.layer.cornerRadius = 5 + bottomRight.layer.cornerCurve = .continuous bottomRight.layer.maskedCorners = .layerMaxXMaxYCorner bottomRight.layer.masksToBounds = true let innerStack = createAttachmentsStack(axis: .vertical, arrangedSubviews: [ @@ -148,10 +154,12 @@ class AttachmentsContainerView: UIView { case 4: let topLeft = createAttachmentView(index: 0, hSize: .half, vSize: .half) topLeft.layer.cornerRadius = 5 + topLeft.layer.cornerCurve = .continuous topLeft.layer.maskedCorners = .layerMinXMinYCorner topLeft.layer.masksToBounds = true let bottomLeft = createAttachmentView(index: 2, hSize: .half, vSize: .half) bottomLeft.layer.cornerRadius = 5 + bottomLeft.layer.cornerCurve = .continuous bottomLeft.layer.maskedCorners = .layerMinXMaxYCorner bottomLeft.layer.masksToBounds = true let left = createAttachmentsStack(axis: .vertical, arrangedSubviews: [ @@ -161,10 +169,12 @@ class AttachmentsContainerView: UIView { attachmentStacks.add(left) let topRight = createAttachmentView(index: 1, hSize: .half, vSize: .half) topRight.layer.cornerRadius = 5 + topRight.layer.cornerCurve = .continuous topRight.layer.maskedCorners = .layerMaxXMinYCorner topRight.layer.masksToBounds = true let bottomRight = createAttachmentView(index: 3, hSize: .half, vSize: .half) bottomRight.layer.cornerRadius = 5 + bottomRight.layer.cornerCurve = .continuous bottomRight.layer.maskedCorners = .layerMaxXMaxYCorner bottomRight.layer.masksToBounds = true let right = createAttachmentsStack(axis: .vertical, arrangedSubviews: [ @@ -196,6 +206,7 @@ class AttachmentsContainerView: UIView { moreView.isUserInteractionEnabled = true moreView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(moreViewTapped))) moreView.layer.cornerRadius = 5 + moreView.layer.cornerCurve = .continuous moreView.layer.maskedCorners = .layerMaxXMaxYCorner moreView.layer.masksToBounds = true let moreLabel = UILabel() @@ -208,6 +219,7 @@ class AttachmentsContainerView: UIView { let topLeft = createAttachmentView(index: 0, hSize: .half, vSize: .half) topLeft.layer.cornerRadius = 5 + topLeft.layer.cornerCurve = .continuous topLeft.layer.maskedCorners = .layerMinXMinYCorner topLeft.layer.masksToBounds = true let bottomLeft = createAttachmentView(index: 2, hSize: .half, vSize: .half) @@ -221,6 +233,7 @@ class AttachmentsContainerView: UIView { attachmentStacks.add(left) let topRight = createAttachmentView(index: 1, hSize: .half, vSize: .half) topRight.layer.cornerRadius = 5 + topRight.layer.cornerCurve = .continuous topRight.layer.maskedCorners = .layerMaxXMinYCorner topRight.layer.masksToBounds = true let right = createAttachmentsStack(axis: .vertical, arrangedSubviews: [ diff --git a/Tusker/Views/Poll/PollOptionCheckboxView.swift b/Tusker/Views/Poll/PollOptionCheckboxView.swift index d9a53d44..cbbcc10f 100644 --- a/Tusker/Views/Poll/PollOptionCheckboxView.swift +++ b/Tusker/Views/Poll/PollOptionCheckboxView.swift @@ -35,6 +35,7 @@ class PollOptionCheckboxView: UIView { let size: CGFloat = 20 layer.cornerRadius = (multiple ? 0.1 : 0.5) * size + layer.cornerCurve = .continuous layer.borderWidth = 2 imageView.translatesAutoresizingMaskIntoConstraints = false diff --git a/Tusker/Views/Poll/PollOptionView.swift b/Tusker/Views/Poll/PollOptionView.swift index e2e89226..20ff807d 100644 --- a/Tusker/Views/Poll/PollOptionView.swift +++ b/Tusker/Views/Poll/PollOptionView.swift @@ -22,6 +22,7 @@ class PollOptionView: UIView { let minHeight: CGFloat = 35 layer.cornerRadius = 0.1 * minHeight + layer.cornerCurve = .continuous backgroundColor = unselectedBackgroundColor checkbox.translatesAutoresizingMaskIntoConstraints = false @@ -66,6 +67,7 @@ class PollOptionView: UIView { fillView.backgroundColor = .tintColor.withAlphaComponent(0.6) fillView.layer.zPosition = -1 fillView.layer.cornerRadius = layer.cornerRadius + fillView.layer.cornerCurve = .continuous addSubview(fillView) NSLayoutConstraint.activate([ diff --git a/Tusker/Views/Profile Header/ProfileHeaderMovedOverlayView.swift b/Tusker/Views/Profile Header/ProfileHeaderMovedOverlayView.swift index 0cc03f6e..696b36e2 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderMovedOverlayView.swift +++ b/Tusker/Views/Profile Header/ProfileHeaderMovedOverlayView.swift @@ -42,6 +42,7 @@ class ProfileHeaderMovedOverlayView: UIView { avatarImageView = CachedImageView(cache: .avatars) avatarImageView.layer.masksToBounds = true avatarImageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 50 + avatarImageView.layer.cornerCurve = .continuous avatarImageView.addInteraction(UIPointerInteraction(delegate: self)) avatarImageView.isUserInteractionEnabled = true diff --git a/Tusker/Views/Profile Header/ProfileHeaderView.swift b/Tusker/Views/Profile Header/ProfileHeaderView.swift index 9f72f5ce..7ae2e1b7 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderView.swift +++ b/Tusker/Views/Profile Header/ProfileHeaderView.swift @@ -66,7 +66,9 @@ class ProfileHeaderView: UIView { avatarContainerView.backgroundColor = .appBackground avatarContainerView.layer.masksToBounds = true + avatarContainerView.layer.cornerCurve = .continuous avatarImageView.layer.masksToBounds = true + avatarImageView.layer.cornerCurve = .continuous avatarImageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(avatarPressed))) avatarImageView.isUserInteractionEnabled = true diff --git a/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift b/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift index 160a017c..3619a38f 100644 --- a/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift @@ -29,6 +29,7 @@ class ConversationMainStatusCollectionViewCell: UICollectionViewListCell, Status private static let avatarImageViewSize: CGFloat = 50 private(set) lazy var avatarImageView = CachedImageView(cache: .avatars).configure { $0.layer.masksToBounds = true + $0.layer.cornerCurve = .continuous NSLayoutConstraint.activate([ $0.heightAnchor.constraint(equalToConstant: ConversationMainStatusCollectionViewCell.avatarImageViewSize), $0.widthAnchor.constraint(equalToConstant: ConversationMainStatusCollectionViewCell.avatarImageViewSize), diff --git a/Tusker/Views/Status/StatusCardView.swift b/Tusker/Views/Status/StatusCardView.swift index d6c13bf7..61591233 100644 --- a/Tusker/Views/Status/StatusCardView.swift +++ b/Tusker/Views/Status/StatusCardView.swift @@ -102,6 +102,7 @@ class StatusCardView: UIView { hStack.spacing = 4 hStack.clipsToBounds = true hStack.layer.borderWidth = 0.5 + hStack.layer.cornerCurve = .continuous hStack.backgroundColor = inactiveBackgroundColor updateBorderColor() diff --git a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift index da3540a0..8bc174bb 100644 --- a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift @@ -33,6 +33,7 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti $0.image = reblogIcon $0.contentMode = .scaleAspectFit $0.layer.masksToBounds = true + $0.layer.cornerCurve = .continuous $0.tintColor = .secondaryLabel NSLayoutConstraint.activate([ // this needs to be lessThanOrEqualTo not just equalTo b/c otherwise intermediate layouts are broken @@ -75,6 +76,7 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti private static let avatarImageViewSize: CGFloat = 50 private(set) lazy var avatarImageView = CachedImageView(cache: .avatars).configure { $0.layer.masksToBounds = true + $0.layer.cornerCurve = .continuous NSLayoutConstraint.activate([ $0.heightAnchor.constraint(equalToConstant: TimelineStatusCollectionViewCell.avatarImageViewSize), $0.widthAnchor.constraint(equalToConstant: TimelineStatusCollectionViewCell.avatarImageViewSize),