💄 Micro-tweaks to cell previews

This commit is contained in:
Stuart Breckenridge committed 2026-02-02 23:26:10 +08:00
1 parent 0cd59a99ff
commit fc48e247c9
4 files changed
+17 -13

No files matched your search

@@ -553,12 +553,12 @@ extension MainTimelineModernViewController: UICollectionViewDelegate {
let previewView = cell.contentView
var bounds = previewView.bounds
let parameters = UIPreviewParameters()
parameters.backgroundColor = .tertiarySystemBackground
parameters.backgroundColor = cell.isSelected ? cell.backgroundConfiguration?.backgroundColor : .tertiarySystemBackground
if let insets = cell.backgroundConfiguration?.backgroundInsets {
bounds = bounds.inset(by: UIEdgeInsets(top: insets.top,
left: -insets.leading,
left: -insets.leading - 4,
bottom: insets.bottom,
right: -insets.trailing))
right: -insets.trailing - 4))
}
parameters.visiblePath = UIBezierPath(roundedRect: bounds,
cornerRadius: 20)
@@ -574,12 +574,12 @@ extension MainTimelineModernViewController: UICollectionViewDelegate {
let previewView = cell.contentView
var bounds = previewView.bounds
let parameters = UIPreviewParameters()
parameters.backgroundColor = .tertiarySystemBackground
parameters.backgroundColor = cell.isSelected ? cell.backgroundConfiguration?.backgroundColor : .tertiarySystemBackground
if let insets = cell.backgroundConfiguration?.backgroundInsets {
bounds = bounds.inset(by: UIEdgeInsets(top: insets.top,
left: -insets.leading,
left: -insets.leading - 4,
bottom: insets.bottom,
right: -insets.trailing))
right: -insets.trailing - 4))
}
parameters.visiblePath = UIBezierPath(roundedRect: bounds,
cornerRadius: 20)