Change SwitchPreference switch color in unchecked state
This commit is contained in:
parent
2f691863c1
commit
e3a2fd5e02
@ -1,6 +1,8 @@
|
||||
package de.mm20.launcher2.ui.component.preferences
|
||||
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Switch
|
||||
import androidx.compose.material.SwitchDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
|
||||
@ -22,7 +24,9 @@ fun SwitchPreference(
|
||||
onValueChanged(!value)
|
||||
},
|
||||
controls = {
|
||||
Switch(checked = value, onCheckedChange = onValueChanged)
|
||||
Switch(checked = value, onCheckedChange = onValueChanged, colors = SwitchDefaults.colors(
|
||||
uncheckedThumbColor = MaterialTheme.colors.onSurface
|
||||
))
|
||||
}
|
||||
)
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user