|
@@ -6644,12 +6644,19 @@ class ViewController: NSViewController {
|
|
|
listClip.drawsBackground = false
|
|
listClip.drawsBackground = false
|
|
|
listScroll.contentView = listClip
|
|
listScroll.contentView = listClip
|
|
|
|
|
|
|
|
|
|
+ // Wrapper document view (same pattern as Settings scroll): without a bottom
|
|
|
|
|
+ // `>= clip` chain, a vertical stack as documentView can stretch to the clip height
|
|
|
|
|
+ // and leave rows pinned to the bottom.
|
|
|
|
|
+ let listDocument = NSView()
|
|
|
|
|
+ listDocument.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
+
|
|
|
let listStack = NSStackView()
|
|
let listStack = NSStackView()
|
|
|
listStack.translatesAutoresizingMaskIntoConstraints = false
|
|
listStack.translatesAutoresizingMaskIntoConstraints = false
|
|
|
listStack.orientation = .vertical
|
|
listStack.orientation = .vertical
|
|
|
listStack.alignment = .leading
|
|
listStack.alignment = .leading
|
|
|
listStack.spacing = 10
|
|
listStack.spacing = 10
|
|
|
- listScroll.documentView = listStack
|
|
|
|
|
|
|
+ listScroll.documentView = listDocument
|
|
|
|
|
+ listDocument.addSubview(listStack)
|
|
|
container.addSubview(listScroll)
|
|
container.addSubview(listScroll)
|
|
|
|
|
|
|
|
let listEmpty = makeLabel("No recordings yet.", size: 12, color: secondaryText, weight: .regular, centered: true)
|
|
let listEmpty = makeLabel("No recordings yet.", size: 12, color: secondaryText, weight: .regular, centered: true)
|
|
@@ -6694,11 +6701,16 @@ class ViewController: NSViewController {
|
|
|
listScroll.bottomAnchor.constraint(equalTo: container.bottomAnchor, constant: -16),
|
|
listScroll.bottomAnchor.constraint(equalTo: container.bottomAnchor, constant: -16),
|
|
|
listScroll.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -16),
|
|
listScroll.trailingAnchor.constraint(equalTo: container.trailingAnchor, constant: -16),
|
|
|
|
|
|
|
|
- // Pin document view to the clip view without horizontal insets: when the clip is still
|
|
|
|
|
- // width 0 during layout, leading/trailing + width - 16 over-constrains and breaks.
|
|
|
|
|
- listStack.topAnchor.constraint(equalTo: listClip.topAnchor, constant: 8),
|
|
|
|
|
- listStack.leadingAnchor.constraint(equalTo: listClip.leadingAnchor),
|
|
|
|
|
- listStack.trailingAnchor.constraint(equalTo: listClip.trailingAnchor),
|
|
|
|
|
|
|
+ listDocument.topAnchor.constraint(equalTo: listClip.topAnchor),
|
|
|
|
|
+ listDocument.leadingAnchor.constraint(equalTo: listClip.leadingAnchor),
|
|
|
|
|
+ listDocument.trailingAnchor.constraint(equalTo: listClip.trailingAnchor),
|
|
|
|
|
+ listDocument.widthAnchor.constraint(equalTo: listClip.widthAnchor),
|
|
|
|
|
+ listDocument.bottomAnchor.constraint(greaterThanOrEqualTo: listClip.bottomAnchor),
|
|
|
|
|
+
|
|
|
|
|
+ listStack.topAnchor.constraint(equalTo: listDocument.topAnchor, constant: 8),
|
|
|
|
|
+ listStack.leadingAnchor.constraint(equalTo: listDocument.leadingAnchor),
|
|
|
|
|
+ listStack.trailingAnchor.constraint(equalTo: listDocument.trailingAnchor),
|
|
|
|
|
+ listDocument.bottomAnchor.constraint(greaterThanOrEqualTo: listStack.bottomAnchor, constant: 8),
|
|
|
|
|
|
|
|
listEmpty.centerXAnchor.constraint(equalTo: listScroll.centerXAnchor),
|
|
listEmpty.centerXAnchor.constraint(equalTo: listScroll.centerXAnchor),
|
|
|
listEmpty.centerYAnchor.constraint(equalTo: listScroll.centerYAnchor),
|
|
listEmpty.centerYAnchor.constraint(equalTo: listScroll.centerYAnchor),
|