I have a SwiftUI Mac Catalyst app. I create a toolbar like this
NavigationSplitView(columnVisibility: $sceneModel.columnVisibility, preferredCompactColumn: $preferredColumn) {
sidebarView()
} detail: {
contentView()
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
HStack {
Button {
sceneModel.onMaps(sender: self)
} label: {
Image(systemName: "map")
.font(.title2)
}
Button {
sceneModel.onSearch(sender: self)
} label: {
Image(systemName: "magnifyingglass")
.font(.title2)
}
...
}
}
}
}
When my Mac Appearance is set to dark mode and the content under the toolbar is dark the toolbar looks good like this.
But then if I have light content under the toolbar, the glass effect changes to light, but the tint on the icons stays white instead of changing to black and it is hard to see the icon. It looks like this.
When I set the Appearance on my Mac to light, then the toolbar works just fine on both dark and light colored backgrounds.
Does anyone know how I can fix this when the appearance is Dark?
Thanks for your post again.
This is an excellent response, and you have also provided the solution. It appears that Optimize for Mac
may be causing the issue, as you mentioned. Let us proceed with filing a bug report for your project, and your detailed description will be invaluable in troubleshooting the problem.
Once you open the bug report, please post the FB number here for my reference.
If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?
Albert Pascual Worldwide Developer Relations.