Fix status bar color in Compose theme

Use surface color instead of primary to match TopAppBar
This commit is contained in:
世界
2025-12-22 14:35:24 +08:00
parent 33896eeb4e
commit 8631d79cb3

View File

@@ -51,7 +51,7 @@ fun SFATheme(
if (!view.isInEditMode) {
SideEffect {
val window = (view.context as? Activity)?.window ?: return@SideEffect
window.statusBarColor = colorScheme.primary.toArgb()
window.statusBarColor = colorScheme.surface.toArgb()
window.navigationBarColor = colorScheme.background.toArgb()
WindowCompat.getInsetsController(window, view).apply {
isAppearanceLightStatusBars = !darkTheme