Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Sources/ActionBar/Views/MenuContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ struct MenuContentView: View {
@EnvironmentObject private var updater: UpdaterService
@State private var now = Date()
@State private var showAbout = false
@State private var runsHeight: CGFloat = 0

var body: some View {
if appState.isAuthenticated && !appState.needsInstallation {
Expand Down Expand Up @@ -149,8 +150,14 @@ struct MenuContentView: View {
}
}
}
// The menu window takes its content's ideal size, and a ScrollView's
// ideal height doesn't follow its content, so size the list to it.
.onGeometryChange(for: CGFloat.self) { $0.size.height } action: {
runsHeight = $0
}
}
.frame(maxHeight: 400)
.scrollBounceBehavior(.basedOnSize)
.frame(height: min(runsHeight, 400))
}

private func errorView(_ message: String) -> some View {
Expand Down
Loading