i have 2 SwiftUI buttons for a macOS program. This is how they are supposed to look like:
However on some devices they are looking like this:
I haven't been able to see a pattern on which devices it's incorrect and not. Here is the code i am using for the 2 buttons.
label: {
Text("Camera Test\nMachineProfile")
.font(.largeTitle)
.fontWeight(.bold)
.padding()
})
.buttonStyle(SampleStyle())
struct SampleStyle: ButtonStyle {
func makeBody(configuration: Self.Configuration) -> some View {
configuration.label
.padding(13)
.background(!configuration.isPressed ?
Color(.gray) :
Color(.blue))
.foregroundColor(!configuration.isPressed ? .black : .black)
.cornerRadius(18.0)
}
}
Anyone able to help me figure out what's wrong?