Adjust switch preference switch colors
This commit is contained in:
parent
1814e21181
commit
0902ee2583
@ -50,7 +50,9 @@ fun PreferenceWithSwitch(
|
|||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
onCheckedChange = onSwitchChanged,
|
onCheckedChange = onSwitchChanged,
|
||||||
colors = SwitchDefaults.colors(
|
colors = SwitchDefaults.colors(
|
||||||
uncheckedThumbColor = MaterialTheme.colorScheme.onSurface
|
uncheckedThumbColor = MaterialTheme.colorScheme.onSurface,
|
||||||
|
checkedThumbColor = MaterialTheme.colorScheme.primary,
|
||||||
|
checkedTrackColor = MaterialTheme.colorScheme.primary
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,9 @@ fun SwitchPreference(
|
|||||||
},
|
},
|
||||||
controls = {
|
controls = {
|
||||||
Switch(checked = value, onCheckedChange = onValueChanged, colors = SwitchDefaults.colors(
|
Switch(checked = value, onCheckedChange = onValueChanged, colors = SwitchDefaults.colors(
|
||||||
uncheckedThumbColor = MaterialTheme.colorScheme.onSurface
|
uncheckedThumbColor = MaterialTheme.colorScheme.onSurface,
|
||||||
|
checkedThumbColor = MaterialTheme.colorScheme.primary,
|
||||||
|
checkedTrackColor = MaterialTheme.colorScheme.primary
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user