mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 09:50:16 +00:00
Compute the timeline's remaining width from contentSize, which includes the sidebar overlap, so the sidebar-compensating inset doesn't drop out and let the timeline render under the sidebar.
This commit is contained in:
1 parent
d7f1d1694c
commit
368a09beed
1 file changed
+2
-1
@@ -845,7 +845,8 @@ private extension MainTimelineModernViewController {
|
||||
/// Note to future self: apply insets that affect cell width
|
||||
/// calculations (leading swipe actions with sidebar visible)
|
||||
let sidebarOverlapWidth = layoutEnvironment.container.contentInsets.leading
|
||||
let remainingWidth = layoutEnvironment.container.effectiveContentSize.width - sidebarOverlapWidth
|
||||
// container.contentSize includes the width under the sidebar.
|
||||
let remainingWidth = layoutEnvironment.container.contentSize.width - sidebarOverlapWidth
|
||||
section.contentInsets = NSDirectionalEdgeInsets(
|
||||
top: 0,
|
||||
leading: remainingWidth > 0 ? sidebarOverlapWidth : 0,
|
||||
|
||||
Reference in new issue
Block a user