1

I created a macOS App with a NavigationView and a Toolbar. Somehow next to my toolbarItem there is a lot of space.. So whenever I change the size of my apps window the toolbarItem disappears. Despite there is still a lot of space for my item. I did not find out how to reduce that space.. Can you help me?

var body: some View {
    NavigationView {
    }
       .toolbar(content: {
          ToolbarItem(placement: .navigation) {
             Image(systemName: "gearshape")
                .frame(height: 20)
          }
       })

enter image description here

printDavid
  • 165
  • 1
  • 9

1 Answers1

0

I found the problem. The title is existing and just invisible. You can remove the title by adding .windowToolbarStyle(.unifiedCompact(showsTitle: false)) to the WindowGroup.

printDavid
  • 165
  • 1
  • 9