WindowIdealSize
A type which defines the size a window should use when zooming.
Declaration
struct WindowIdealSizeOverview
Use this type in conjunction with the Scene.windowIdealSize(_:) modifier to override the default behavior for how windows behave when performing a zoom.
For example, you can define a window group where the window has an ideal width of 800 points and an ideal height of 600 points:
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.frame(idealWidth: 800, idealHeight: 600)
}
.windowIdealSize(.fitToContent)
}
}