mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 08:42:51 +00:00
Calculate timeline pane width, since its reported width is not what we want.
This commit is contained in:
1 parent
36347924c0
commit
02bc49611e
1 file changed
+9
-2
@@ -990,8 +990,15 @@ private extension MainWindowController {
|
||||
let isFullScreen = window?.styleMask.contains(.fullScreen) ?? false
|
||||
|
||||
let splitViewWidths: [Int]
|
||||
if let splitView = splitViewController?.splitView {
|
||||
splitViewWidths = splitView.arrangedSubviews.map { Int(floor($0.frame.width)) }
|
||||
if let splitView = splitViewController?.splitView, let window {
|
||||
let sidebarWidth = splitView.arrangedSubviews[0].frame.width
|
||||
let detailWidth = splitView.arrangedSubviews[2].frame.width
|
||||
// Starting with macOS 26, timelineWidth has to be calculated —
|
||||
// because its width is greater than its apparent width,
|
||||
// so that things can slide under the sidebar.
|
||||
let dividerThickness = splitView.dividerThickness
|
||||
let timelineWidth = window.frame.width - (sidebarWidth + detailWidth + (dividerThickness * 2))
|
||||
splitViewWidths = [Int(floor(sidebarWidth)), Int(floor(timelineWidth)), Int(floor(detailWidth))]
|
||||
} else {
|
||||
splitViewWidths = []
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user