Fix macOS form style
This commit is contained in:
@@ -19,6 +19,7 @@ public struct MacApplication: Scene {
|
|||||||
.environment(\.showMenuBarExtra, $showMenuBarExtra)
|
.environment(\.showMenuBarExtra, $showMenuBarExtra)
|
||||||
.environmentObject(environments)
|
.environmentObject(environments)
|
||||||
})
|
})
|
||||||
|
.windowResizability(.contentSize)
|
||||||
.commands {
|
.commands {
|
||||||
if showMenuBarExtra {
|
if showMenuBarExtra {
|
||||||
CommandGroup(replacing: .appTermination) {
|
CommandGroup(replacing: .appTermination) {
|
||||||
|
|||||||
@@ -25,12 +25,15 @@ public struct MainView: View {
|
|||||||
private var body1: some View {
|
private var body1: some View {
|
||||||
NavigationSplitView {
|
NavigationSplitView {
|
||||||
SidebarView()
|
SidebarView()
|
||||||
|
.navigationSplitViewColumnWidth(150)
|
||||||
} detail: {
|
} detail: {
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
selection.contentView
|
selection.contentView
|
||||||
.navigationTitle(selection.title)
|
.navigationTitle(selection.title)
|
||||||
}
|
}
|
||||||
|
.navigationSplitViewColumnWidth(600)
|
||||||
}
|
}
|
||||||
|
.frame(minHeight: 470)
|
||||||
.onAppear {
|
.onAppear {
|
||||||
environments.postReload()
|
environments.postReload()
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
@@ -60,7 +63,6 @@ public struct MainView: View {
|
|||||||
.onReceive(environments.openSettings) {
|
.onReceive(environments.openSettings) {
|
||||||
selection = .settings
|
selection = .settings
|
||||||
}
|
}
|
||||||
.formStyle(.grouped)
|
|
||||||
.environment(\.selection, $selection)
|
.environment(\.selection, $selection)
|
||||||
.environment(\.importProfile, $importProfile)
|
.environment(\.importProfile, $importProfile)
|
||||||
.environment(\.importRemoteProfile, $importRemoteProfile)
|
.environment(\.importRemoteProfile, $importRemoteProfile)
|
||||||
|
|||||||
Reference in New Issue
Block a user