Constrain window size to 900-1000px width to prevent stretched layouts

This commit is contained in:
Beingpax 2026-01-05 16:41:16 +05:45
parent 8f099cf701
commit 772fd3d4ca
2 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,7 @@ struct ContentView: View {
} }
} }
.navigationSplitViewStyle(.balanced) .navigationSplitViewStyle(.balanced)
.frame(minWidth: 940, minHeight: 730) .frame(minWidth: 900, maxWidth: 1000, minHeight: 730)
.onReceive(NotificationCenter.default.publisher(for: .navigateToDestination)) { notification in .onReceive(NotificationCenter.default.publisher(for: .navigateToDestination)) { notification in
if let destination = notification.userInfo?["destination"] as? String { if let destination = notification.userInfo?["destination"] as? String {
switch destination { switch destination {

View File

@ -276,6 +276,8 @@ struct VoiceInkApp: App {
} }
} }
.windowStyle(.hiddenTitleBar) .windowStyle(.hiddenTitleBar)
.defaultSize(width: 970, height: 730)
.windowResizability(.contentSize)
.commands { .commands {
CommandGroup(replacing: .newItem) { } CommandGroup(replacing: .newItem) { }