From e8a68511f1f81eab3d479657a7f0b0146a30af07 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 21 Sep 2019 17:24:50 -0500 Subject: [PATCH] Add a small amount of corner clipping to favicons --- iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift | 5 ++++- iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift index 80c30cb82..47645738b 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift @@ -93,7 +93,10 @@ class MasterFeedTableViewCell : NNWTableViewCell { }() private let faviconImageView: UIImageView = { - return NonIntrinsicImageView(image: AppAssets.faviconTemplateImage) + let imageView = NonIntrinsicImageView(image: AppAssets.faviconTemplateImage) + imageView.layer.cornerRadius = MasterFeedTableViewCellLayout.faviconCornerRadius + imageView.clipsToBounds = true + return imageView }() private var unreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift index 6da4a0345..0417cc1f4 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift @@ -21,6 +21,8 @@ struct MasterFeedTableViewCellLayout { private static let minRowHeight = CGFloat(integerLiteral: 44) + static let faviconCornerRadius = CGFloat(integerLiteral: 2) + let faviconRect: CGRect let titleRect: CGRect let unreadCountRect: CGRect