mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-03 10:47:21 +00:00
additional collectionview work
This commit is contained in:
4 files changed
+175
-155
No files matched your search
@@ -197,7 +197,9 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
|
||||
}
|
||||
|
||||
func titleTextColor(for state: UICellConfigurationState) -> UIColor {
|
||||
if state.isSelected {
|
||||
if state.isSwiped {
|
||||
return .label
|
||||
} else if state.isSelected {
|
||||
return .white
|
||||
} else {
|
||||
return .label
|
||||
@@ -232,10 +234,6 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
|
||||
|
||||
var backgroundConfig = UIBackgroundConfiguration.listCell().updated(for: state)
|
||||
backgroundConfig.cornerRadius = 20
|
||||
if traitCollection.userInterfaceIdiom == .pad {
|
||||
backgroundConfig.edgesAddingLayoutMarginsToBackgroundInsets = [.leading, .trailing]
|
||||
backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: !isPreview ? -4 : -12, bottom: 0, trailing: !isPreview ? -4 : -12)
|
||||
}
|
||||
|
||||
if state.isSwiped {
|
||||
backgroundConfig.backgroundColor = .secondarySystemFill
|
||||
|
||||
Reference in new issue
Block a user