In my code below I am trying to have both views with the systemImage "line.3.horizontal.circle.fill" be green. But the view as a toolbaritem is showing as default blue. I can currently on the new Xcode and running on iOS 17
struct SwiftUITestView: View {
var body: some View {
NavigationStack{
HStack{
Text("test")
Menu{
Button{
print("test")
}label:{
Text("test")
}
} label:{
Label("Filter", systemImage: "line.3.horizontal.circle.fill")
.foregroundStyle(.green)
.frame(width: 20, height: 20)
}
.menuActionDismissBehavior(.disabled)
}
.toolbar(content: {
ToolbarItem(placement: .topBarTrailing) {
Menu{
Button{
print("test")
}label:{
Text("test")
}
} label:{
Label("Filter", systemImage: "line.3.horizontal.circle.fill")
.foregroundStyle(.green)
.frame(width: 20, height: 20)
}
.menuActionDismissBehavior(.disabled)
}
})
}
}
}
I'm wanting both of the Labels to be green