Fix Navbar color (#136)

This commit is contained in:
tarsin 2023-01-29 10:32:34 +08:00 committed by GitHub
parent 4cf930a9dc
commit e76cf08934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.unit.dp
import androidx.core.view.ViewCompat
import com.google.accompanist.systemuicontroller.rememberSystemUiController
@ -47,6 +48,12 @@ fun KernelSUTheme(
color = colorScheme.surface,
darkIcons = !darkTheme
)
// To match the App Navbar color
systemUiController.setNavigationBarColor(
color = colorScheme.surfaceColorAtElevation(8.dp),
darkIcons = !darkTheme,
)
}
MaterialTheme(
@ -54,4 +61,4 @@ fun KernelSUTheme(
typography = Typography,
content = content
)
}
}