How can you make the hover highlight rounded?

I have the following toolbar button:

Code Block
Button(action: {}, label: {
    Text("Button")
        .padding()
})
.hoverEffect()


When I hover the button with a mouse on iPad, a rectangle with square corners appears. I've tried using the cornerRadius and clipShape modifiers to make the corners rounded with no luck. Is there a way to accomplish this in SwiftUI? I would like it match the hover effect on the navigation bar back button.
Answered by samwarnick in 618325022
Looks like you can use the contentShape modifier.

Code Block swift
Button(action: {}) {
Text("Button")
.padding()
}
.contentShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
.hoverEffect()

Accepted Answer
Looks like you can use the contentShape modifier.

Code Block swift
Button(action: {}) {
Text("Button")
.padding()
}
.contentShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
.hoverEffect()

How can you make the hover highlight rounded?
 
 
Q