In macOS i want to color the Image that opens the menu, whatever i do i just get the text colored icon
Menu {
Button {
} label: {
Text("Some item")
}
} label: {
Image(systemName: "chevron.down.circle.fill")
.foregroundColor(.red)
}
.menuStyle(.borderlessButton)
.menuIndicator(.hidden)
.foregroundColor(.blue)
.fixedSize(horizontal: true, vertical: false)
how to color the icon like this
You can replace your foregroundColor
modifier with a foregroundStyle
with two colors, to use palette rendering:
Menu {
Button {
} label: {
Text("Some item")
}
} label: {
Image(systemName: "chevron.down.circle.fill")
.foregroundStyle(.white, .green)
}