diff --git a/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt b/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt index 9d2ea1e3..46792100 100644 --- a/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt +++ b/ui/src/main/java/de/mm20/launcher2/ui/component/preferences/PreferenceScreen.kt @@ -1,5 +1,6 @@ package de.mm20.launcher2.ui.component.preferences +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn @@ -9,7 +10,8 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.ArrowBack import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.google.accompanist.insets.statusBarsPadding +import androidx.compose.ui.graphics.Color +import com.google.accompanist.insets.systemBarsPadding import com.google.accompanist.systemuicontroller.rememberSystemUiController import de.mm20.launcher2.ui.locals.LocalNavController @@ -21,28 +23,33 @@ fun PreferenceScreen( val navController = LocalNavController.current val systemUiController = rememberSystemUiController() systemUiController.setStatusBarColor(MaterialTheme.colors.surface) - Scaffold( - topBar = { - TopAppBar( - backgroundColor = MaterialTheme.colors.surface, - title = { - Text(title) - }, - modifier = Modifier.statusBarsPadding(), - navigationIcon = { - IconButton(onClick = { - navController?.navigateUp() - }) { - Icon(imageVector = Icons.Rounded.ArrowBack, contentDescription = "Back") + systemUiController.setNavigationBarColor(Color.Black) + Box( + modifier = Modifier.systemBarsPadding() + ) { + Scaffold( + topBar = { + TopAppBar( + backgroundColor = MaterialTheme.colors.surface, + title = { + Text(title) + }, + navigationIcon = { + IconButton(onClick = { + navController?.navigateUp() + }) { + Icon(imageVector = Icons.Rounded.ArrowBack, contentDescription = "Back") + } } - } + ) + }) { + LazyColumn( + modifier = Modifier + .fillMaxSize() + .padding(it), + content = content ) - }) { - LazyColumn( - modifier = Modifier - .fillMaxSize() - .padding(it), - content = content - ) + } } + } \ No newline at end of file