Fixed colors for switch and radio button

This commit is contained in:
Sad Ellie 2022-06-18 19:36:10 +03:00
parent a6f1ddee7d
commit c4b42c764b
2 changed files with 5 additions and 10 deletions

View File

@ -12,7 +12,6 @@ import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RadioButton
import androidx.compose.material3.RadioButtonDefaults
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
@ -102,11 +101,7 @@ private fun CustomDialogContentListItem(
) {
RadioButton(
selected = selected,
onClick = onClick,
colors = RadioButtonDefaults.colors(
selectedColor = MaterialTheme.colorScheme.onPrimaryContainer,
unselectedColor = MaterialTheme.colorScheme.onPrimaryContainer
)
onClick = onClick
)
Text(
text = label

View File

@ -76,8 +76,8 @@ fun dynamicLightTheme(context: Context): ColorScheme {
return lightColorScheme(
// Settings screen group text, units screen units group text
primary = primary,
// Text color on Third party Licenses screen
onPrimary = primary.shiftTo255(0.3f),
// Switch thumb color
onPrimary = primary.getAppropriateTextColor(),
onPrimaryContainer = primary.shiftTo0(0.7f),
// Selected unit, group, keyboard buttons
secondaryContainer = secondary,
@ -132,8 +132,8 @@ fun dynamicDarkTheme(context: Context): ColorScheme {
return darkColorScheme(
// Settings screen group text, units screen units group text
primary = primary,
// Text color on Third party Licenses screen
onPrimary = primary.shiftTo0(0.3f),
// Switch thumb color
onPrimary = primary.getAppropriateTextColor(),
onPrimaryContainer = primary.shiftTo255(0.7f),
// Selected unit, group, keyboard buttons
secondaryContainer = secondary,