mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-06 04:07:54 +00:00
💄 Micro-tweaks to cell previews
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user