1
Fork 0
mirror of https://github.com/Steffo99/twom.git synced 2024-11-22 08:04:26 +00:00

Apply surface color to navigationBar

This commit is contained in:
Steffo 2023-12-01 04:21:45 +01:00
parent dca76a40af
commit bc41e909c7
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -38,7 +38,10 @@ fun TwoMTheme(
SideEffect { SideEffect {
val window = (view.context as Activity).window val window = (view.context as Activity).window
window.statusBarColor = colorScheme.surface.toArgb() window.statusBarColor = colorScheme.surface.toArgb()
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme window.navigationBarColor = colorScheme.surface.toArgb()
val insets = WindowCompat.getInsetsController(window, view)
insets.isAppearanceLightStatusBars = !darkTheme
insets.isAppearanceLightNavigationBars = !darkTheme
} }
} }
} }