feat: add high-contrast theme with accessible message bubbles (#5135)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
James Rich 2026-04-14 20:14:20 -05:00 committed by GitHub
parent f48fc61729
commit fa63a4ac50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 328 additions and 65 deletions

View file

@ -124,6 +124,8 @@ class MainActivity : ComponentActivity() {
setSingletonImageLoaderFactory { get<ImageLoader>() }
val theme by model.theme.collectAsStateWithLifecycle()
val contrastLevelValue by model.contrastLevel.collectAsStateWithLifecycle()
val contrastLevel = org.meshtastic.core.ui.theme.ContrastLevel.fromValue(contrastLevelValue)
val dynamic = theme == MODE_DYNAMIC
val dark =
when (theme) {
@ -141,7 +143,7 @@ class MainActivity : ComponentActivity() {
}
AppCompositionLocals {
AppTheme(dynamicColor = dynamic, darkTheme = dark) {
AppTheme(dynamicColor = dynamic, darkTheme = dark, contrastLevel = contrastLevel) {
val appIntroCompleted by model.appIntroCompleted.collectAsStateWithLifecycle()
// Signal to the system that the initial UI is "fully drawn"