Skip to content
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

UI: Add transportModeBackgroundColor function and adjust LegView background #266

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Oct 30, 2024

TL;DR

Added a new function for transport mode background color and updated LegView background color logic.

What changed?

  • Introduced a new transportModeBackgroundColor function in ColorExt.kt that returns a color based on the transport mode and current theme (light/dark).
  • Updated the LegView component in LegView.kt to use the system's dark theme setting for determining background color opacity.
  • Adjusted the background color opacity for both light and dark themes in LegView.

Why make this change?

This change improves the visual consistency of the app across different system themes. By adjusting the background color opacity based on the theme, we enhance readability and user experience in both light and dark modes. The new transportModeBackgroundColor function also centralizes the logic for determining the appropriate background color, making it easier to maintain and update in the future.

Screenshots

Screenshot 2024-10-30 at 7 12 17 pm

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ksharma-xyz and the rest of your teammates on Graphite Graphite

@ksharma-xyz ksharma-xyz changed the title Calculate color code using Transport Mode UI: Add transportModeBackgroundColor function and adjust LegView background Oct 30, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review October 30, 2024 05:57
@ksharma-xyz ksharma-xyz force-pushed the 10-30-calculate_color_code_using_transport_mode branch from 30040ff to 40218f8 Compare October 30, 2024 05:58
@ksharma-xyz ksharma-xyz enabled auto-merge (squash) October 30, 2024 08:04
@ksharma-xyz ksharma-xyz force-pushed the 10-30-calculate_color_code_using_transport_mode branch 2 times, most recently from b041be4 to df50b05 Compare October 30, 2024 08:11
@ksharma-xyz ksharma-xyz force-pushed the 10-30-calculate_color_code_using_transport_mode branch from df50b05 to 9afb97b Compare October 30, 2024 08:11
@ksharma-xyz ksharma-xyz merged commit bbb95e4 into main Oct 30, 2024
3 checks passed
@ksharma-xyz ksharma-xyz deleted the 10-30-calculate_color_code_using_transport_mode branch October 30, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant