我想更改默认的菜单按钮样式。我希望使用默认的按钮颜色,而不是Color.gray
MenuButton("Actions") {
Button(action: {
}, label: { Text("Action 1") })
Button(action: {
}, label: { Text("Action 2") })
}
.menuButtonStyle(BorderlessButtonMenuButtonStyle())
.background(RoundedRectangle(cornerRadius: 5).foregroundColor(Color.gray))
我试图更改默认样式,它看起来像
![enter image description here](https://istack.dev59.com/VMnHW.webp)
![enter image description here](https://istack.dev59.com/bp918.webp)
Color(NSColor.controlColor)
或来自该区域的内容会对你有所帮助。 - Asperi