So I have a button on a widget styled as seen below. I want this button to take up the entirety of the width, problem is, when it does so either using a frame(maxWidth: .infinity)
or if I increase the horizontal padding, the button still only gets clicked if the user taps near the buttons center. Otherwise, it will open the app.
Relevant code:
Button(intent: Intent_StartRest() ){
Text("stop")
}
.buttonStyle(PlainButtonStyle())
.tint(.clear)
.padding(.vertical, 6)
.padding(.horizontal, 100)
.background(RoundedRectangle(cornerRadius: 30).fill(.button))
.foregroundStyle(.buttonText) // Just sets text color
.useAppFont(size: 18, relativeTo: .caption, weight: .bold) // Just sets font
Any pointers?