Add missing onBackground color preference in theme editor

This commit is contained in:
MM20 2024-05-04 16:01:31 +02:00
parent 9f6cda964d
commit 900e39c680
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -1050,6 +1050,31 @@ fun ThemeSettingsScreen(themeId: UUID) {
defaultValue = selectedDefaultScheme.onSurfaceVariant,
modifier = Modifier.padding(end = 12.dp),
)
ThemeColorPreference(
title = "On Background",
value = selectedColorScheme.onBackground,
corePalette = mergedCorePalette,
onValueChange = {
viewModel.updateTheme(
if (previewDarkTheme) {
theme!!.copy(
darkColorScheme = theme!!.darkColorScheme.copy(
onBackground = it
)
)
} else {
theme!!.copy(
lightColorScheme = theme!!.lightColorScheme.copy(
onBackground = it
)
)
}
)
},
defaultValue = selectedDefaultScheme.onSurfaceVariant,
modifier = Modifier.padding(end = 12.dp),
)
},
) {
ElevatedCard(