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
@@ -126,7 +126,7 @@
|
||||
<size key="itemSize" width="402" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="8" minY="0.0" maxX="8" maxY="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MainTimelineCellIndexZero" id="mnV-bT-V2W" customClass="MainTimelineCollectionViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
|
||||
@@ -309,7 +309,11 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -8, bottom: 0, trailing: -8)
|
||||
} else {
|
||||
backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -12, bottom: 0, trailing: -12)
|
||||
if !isPreview {
|
||||
backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -12, bottom: 0, trailing: -12)
|
||||
} else {
|
||||
backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: -16, bottom: 0, trailing: -16)
|
||||
}
|
||||
}
|
||||
|
||||
if state.isSwiped && state.isSelected {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -649,7 +649,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" automaticEstimatedItemSize="YES" minimumLineSpacing="20" minimumInteritemSpacing="10" id="JcL-Zm-mbs">
|
||||
<collectionViewFlowLayout key="collectionViewLayout" automaticEstimatedItemSize="YES" minimumLineSpacing="20" minimumInteritemSpacing="10" sectionInsetReference="safeArea" id="JcL-Zm-mbs">
|
||||
<size key="itemSize" width="414" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
@@ -983,16 +983,16 @@
|
||||
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="secondaryLabelColor">
|
||||
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="secondarySystemBackgroundColor">
|
||||
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="secondarySystemFillColor">
|
||||
<color red="0.47058823529411764" green="0.47058823529411764" blue="0.50196078431372548" alpha="0.16" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.47058823529999999" green="0.47058823529999999" blue="0.50196078430000002" alpha="0.16" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="separatorColor">
|
||||
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
|
||||
Reference in new issue
Block a user