-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text in scale bar is not adopting to dark mode #967
Comments
@saratchandrakarumuri The scalebar is switching color when switching to Dark Mode. You can see in the "Light mode" image that the text is dark (black). In the "Dark mode" image, the text color has switched to white. In a true adaptive app the base map would change to a darker color, which would make the white text the appropriate color. As it is now on the very light-colored base map, the white is hard to see. In the code, the text color is set to |
I think the colors in https://github.com/Esri/arcgis-maps-sdk-swift-toolkit/blob/main/Sources/ArcGISToolkit/Components/Scalebar/ScalebarSettings.swift#L60-L70 can be adjusted.
edit: it might be an oddball solution, but maybe the semantic styles can be used: https://developer.apple.com/documentation/swiftui/shapestyle#Semantic-styles
|
Since the only semantic colors available are primary and secondary (which equate to either white & lighter gray or black & darker gray) we'd need to use something like Because scalebars are often overlaid directly on maps it seems basemap coloring should actually have more weight on scalebar coloring than light or dark mode. Adapting the scalebar to the color scheme assumes the SDK user is also adapting the basemap to the color scheme. Long term it might be good to look at how we could make the scalebar coloring automatically or more easily adapt to the current basemap coloring. |
Text in scale bar is still rendering in white when the device is set to dark mode. Text need to be adopted to display mode
The text was updated successfully, but these errors were encountered: