From e8cdcdfb7f27caead82a8450eb4391da9d89dad8 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Sun, 14 Sep 2025 14:48:22 -0700 Subject: [PATCH] Adding some size fixing (#709) --- Sources/Secretive/App.swift | 4 +++- Sources/Secretive/Views/Configuration/SetupView.swift | 2 ++ .../Secretive/Views/Configuration/ToolConfigurationView.swift | 1 + Sources/Secretive/Views/Views/AboutView.swift | 2 +- Sources/Secretive/Views/Views/ContentView.swift | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Sources/Secretive/App.swift b/Sources/Secretive/App.swift index 10d5d18..4c3dff1 100644 --- a/Sources/Secretive/App.swift +++ b/Sources/Secretive/App.swift @@ -9,13 +9,13 @@ struct Secretive: App { @Environment(\.agentStatusChecker) var agentStatusChecker @Environment(\.justUpdatedChecker) var justUpdatedChecker - @AppStorage("defaultsHasRunSetup") var hasRunSetup = false @SceneBuilder var body: some Scene { WindowGroup { ContentView() .environment(EnvironmentValues._secretStoreList) .onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in + @AppStorage("defaultsHasRunSetup") var hasRunSetup = false guard hasRunSetup else { return } agentStatusChecker.check() if agentStatusChecker.running && justUpdatedChecker.justUpdatedBuild { @@ -32,10 +32,12 @@ struct Secretive: App { WindowGroup(id: String(describing: IntegrationsView.self)) { IntegrationsView() } + .windowResizability(.contentMinSize) WindowGroup(id: String(describing: AboutView.self)) { AboutView() } .windowStyle(.hiddenTitleBar) + .windowResizability(.contentSize) } } diff --git a/Sources/Secretive/Views/Configuration/SetupView.swift b/Sources/Secretive/Views/Configuration/SetupView.swift index ed04eb9..5a2b5f5 100644 --- a/Sources/Secretive/Views/Configuration/SetupView.swift +++ b/Sources/Secretive/Views/Configuration/SetupView.swift @@ -85,7 +85,9 @@ struct SetupView: View { integrations = true }, content: { IntegrationsView() + .frame(minWidth: 500, minHeight: 400) }) + .fixedSize(horizontal: false, vertical: true) } } diff --git a/Sources/Secretive/Views/Configuration/ToolConfigurationView.swift b/Sources/Secretive/Views/Configuration/ToolConfigurationView.swift index cd1bc69..d23679a 100644 --- a/Sources/Secretive/Views/Configuration/ToolConfigurationView.swift +++ b/Sources/Secretive/Views/Configuration/ToolConfigurationView.swift @@ -32,6 +32,7 @@ struct ToolConfigurationView: View { selectedSecret = created } } + .fixedSize() } } } diff --git a/Sources/Secretive/Views/Views/AboutView.swift b/Sources/Secretive/Views/Views/AboutView.swift index a9708ab..415f202 100644 --- a/Sources/Secretive/Views/Views/AboutView.swift +++ b/Sources/Secretive/Views/Views/AboutView.swift @@ -33,7 +33,7 @@ struct AboutViewContent: View { Button(.aboutBuildLogButton) { openURL(Bundle.main.buildLog) } - .normalButton() + .normalButton() } } } diff --git a/Sources/Secretive/Views/Views/ContentView.swift b/Sources/Secretive/Views/Views/ContentView.swift index 7c395df..8ac9854 100644 --- a/Sources/Secretive/Views/Views/ContentView.swift +++ b/Sources/Secretive/Views/Views/ContentView.swift @@ -16,7 +16,7 @@ struct ContentView: View { @Environment(\.updater) private var updater @Environment(\.agentStatusChecker) private var agentStatusChecker - @AppStorage("defaultsHasRunSetup") private var hasRunSetup = false + @State private var hasRunSetup = false @State private var showingCreation = false @State private var showingAppPathNotice = false @State private var runningSetup = false