invert settings coloring

This commit is contained in:
Chloe committed 2025-09-14 20:02:54 -07:00
1 parent b7f378b947
commit 13191dc66f
3 files changed
+13 -11

No files matched your search

@@ -74,6 +74,7 @@ fun DeveloperSettingsScreen(onBackPressedDispatcher: OnBackPressedDispatcher?) {
Scaffold( Scaffold(
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection), modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
containerColor = MaterialTheme.colorScheme.surfaceContainerLow,
topBar = { topBar = {
Column { Column {
TopAppBar( TopAppBar(
@@ -93,6 +94,7 @@ fun DeveloperSettingsScreen(onBackPressedDispatcher: OnBackPressedDispatcher?) {
) )
}, },
scrollBehavior = scrollBehavior, scrollBehavior = scrollBehavior,
colors = TopAppBarDefaults.topAppBarColors(MaterialTheme.colorScheme.surfaceContainerLow),
) )
} }
} }
@@ -107,16 +109,12 @@ fun DeveloperSettingsScreen(onBackPressedDispatcher: OnBackPressedDispatcher?) {
val developerMode by PreferenceUtils.useBooleanPreference(PreferenceUtils.Key.DEVELOPER_MODE) val developerMode by PreferenceUtils.useBooleanPreference(PreferenceUtils.Key.DEVELOPER_MODE)
OptionsGroup {
SettingsCard( SettingsCard(
title = stringResource(R.string.preference_developer_mode), title = stringResource(R.string.preference_developer_mode),
preferenceKey = PreferenceUtils.Key.DEVELOPER_MODE, preferenceKey = PreferenceUtils.Key.DEVELOPER_MODE,
) )
}
InlineText(
stringResource(R.string.preference_developer_mode_about)
)
HorizontalDivider()
if (developerMode) { if (developerMode) {
OptionsGroup(title = stringResource(R.string.preference_category_gameplay)) { OptionsGroup(title = stringResource(R.string.preference_category_gameplay)) {
@@ -261,7 +261,7 @@ fun SettingsScreen(
// fix theme transition by giving it the exact same animation as the top bar // fix theme transition by giving it the exact same animation as the top bar
val containerColor by animateColorAsState( val containerColor by animateColorAsState(
targetValue = MaterialTheme.colorScheme.background, targetValue = MaterialTheme.colorScheme.surfaceContainerLow,
animationSpec = spring(stiffness = Spring.StiffnessMediumLow), animationSpec = spring(stiffness = Spring.StiffnessMediumLow),
label = "background color" label = "background color"
) )
@@ -291,6 +291,7 @@ fun SettingsScreen(
) )
}, },
scrollBehavior = scrollBehavior, scrollBehavior = scrollBehavior,
colors = TopAppBarDefaults.topAppBarColors(MaterialTheme.colorScheme.surfaceContainerLow),
) )
}, },
content = { innerPadding -> content = { innerPadding ->
@@ -85,13 +85,15 @@ fun getSetting(context: Context, preferenceKey: PreferenceUtils.Key): Boolean {
} }
@Composable @Composable
fun OptionsGroup(title: String, content: @Composable () -> Unit) { fun OptionsGroup(title: String? = null, content: @Composable () -> Unit) {
Column { Column {
if (title != null) {
Text( Text(
title, title,
style = Typography.titleMedium, style = Typography.titleMedium,
modifier = Modifier.padding(horizontal = 18.dp, vertical = 8.dp), modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp),
) )
}
Column(modifier = Modifier Column(modifier = Modifier
.padding(horizontal = 12.dp) .padding(horizontal = 12.dp)
@@ -939,11 +941,12 @@ fun OptionsTitle(modifier: Modifier = Modifier, title: String, description: Stri
@Composable @Composable
fun OptionsCard(modifier: Modifier = Modifier, wrapContent: Boolean = false, title: @Composable () -> Unit, content: @Composable () -> Unit) { fun OptionsCard(modifier: Modifier = Modifier, wrapContent: Boolean = false, title: @Composable () -> Unit, content: @Composable () -> Unit) {
Row( Row(
modifier Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(vertical = 1.dp) .padding(vertical = 1.dp)
.clip(RoundedCornerShape(4.dp)) .clip(RoundedCornerShape(4.dp))
.background(MaterialTheme.colorScheme.surfaceContainerLow) .then(modifier)
.background(MaterialTheme.colorScheme.background)
.defaultMinSize(minHeight = 64.dp) .defaultMinSize(minHeight = 64.dp)
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
Arrangement.SpaceBetween, Arrangement.SpaceBetween,