I'd like to make the. box surrounding my rounded button match the background but it's darkened. I would also like to eliminate the dark circle below the button, which looks like it must be generated from using NavigationLink.
Code is as follows:
Button(action: {
self.displayPopupMessage4 = true
// name = shell("my script")
}) {Text("About")
.padding()
.foregroundColor(.white)
.background(.gray)
.cornerRadius(100)}
.alert(isPresented: $displayPopupMessage4){
Alert(title: Text("Attention"), message: Text(shell("/opt/local/nvis/bin/nvis -v")), dismissButton:
.default(Text("OK"), action: {self.showDetail = true})
)
}
if #available(macOS 13.0, *) {
NavigationLink(destination: DetailView().navigationBarBackButtonHidden(true), isActive: self.$showDetail) { EmptyView() }
} else {
// Fallback on earlier versions
}
I want the dark frame around the button to be the hame as the background, and don't want a NavigationLink visible button.


To adjust the appearance of your button and eliminate the dark circle below it, you'll need to make some changes to your
SwiftUIcode. Here's how you can modify it: