swiftuiswiftui-navigationsplitviewswiftui-toolbar

SwiftUI have "Rounded Rectangle" in toolbar


How can I achieve an effect similar to a rounded rectangle in the swiftui toolbar in order to put some basic buttons there? I have seen the effect in Xcode and other programs that have probably been made using Storyboards or XIB Applications but I am against that. I have tried to literally just put a rounded rectangle in the toolbar with a fixed size of 30 and a foreground style of tertiary but it doesn't look the same. Heres an image explaining the effect I want:Image of wanted effect

What would also be great is the fact that when using the .windowToolBarStyle with .unifiedCompact, then all of the toolbar items become super tiny and difficult to read.

Thanks in advance!


Solution

  • Was able to fix it myself. Its called NSTokenField