I have a row of .bordered image buttons. And I want all of them to fill the height of the container, by setting frame(maxHeight: .infinity). However, although the buttons themselves are properly sized, the gray background depicting the border is not. See the attached image. Basically, I want the gray background to fill up to the blue borders.
And here's the simplified code I have.
HStack {
Button(action: { }) {
Image(systemName: "phone.connection.fill").foregroundColor(.green)
}
.buttonStyle(.bordered).fixedSize()
.frame(maxHeight: .infinity)
.border(Color.blue)
Button(action: { }) {
Image(systemName: "phone.down.fill").foregroundColor(.gray)
}
.disabled(true)
.buttonStyle(.bordered).fixedSize()
.frame(maxHeight: .infinity)
.border(Color.blue)
...
}
Any suggestions on how to achieve this? Thanks.

