From 242024232798cf9628d1b1543172139423035b3a Mon Sep 17 00:00:00 2001 From: Piotr Chmolowski Date: Thu, 5 Nov 2026 09:11:55 +0100 Subject: [PATCH] Open the menu at the runs list's full height The menu window takes its content's ideal size, and the runs ScrollView only had a max height, so its ideal height didn't follow the rows. The menu opened short and only grew after Settings (min height 520) had made the window taller. The list now measures its rows and uses that height, capped at 400. Co-Authored-By: Claude Opus 5.5 --- Sources/ActionBar/Views/MenuContentView.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/ActionBar/Views/MenuContentView.swift b/Sources/ActionBar/Views/MenuContentView.swift index 32376d8..ebda54b 100644 --- a/Sources/ActionBar/Views/MenuContentView.swift +++ b/Sources/ActionBar/Views/MenuContentView.swift @@ -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 { @@ -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 {