When I create an App with SwiftUI App Lifecycle the toolbar buttons match with the new Big Sur toolbar button style (with onHover effect style). But if I choose the conventional AppDelegate Lifecycle and customize the toolbar via Storyboards then I get this button style without onHover effect:
The button appears with a rectangle as background. Does anyone know how could I achieve the new style?
I've got this effect after I set NSButton.showsBorderOnlyWhileMouseInside
property.
button.setButtonType(.momentaryPushIn)
button.isBordered = true
button.showsBorderOnlyWhileMouseInside = true
toolbarItem.isBordered = true
isBordered
property will give you that hover effect.
I've just had this problem myself and found the following NSButton settings to work.
Button style = Textured Rounded
Type = Momentary Light
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With