nuhkoca
04/14/2022, 5:10 PMprivate object MyRipple : RippleTheme {
@Composable
override fun defaultColor(): Color = TRTheme.colors.secondaryBlue1
@Composable
override fun rippleAlpha(): RippleAlpha = RippleTheme.defaultRippleAlpha(
Color.Black,
lightTheme = !isSystemInDarkTheme()
)
}
Louis Pullen-Freilich [G]
04/14/2022, 5:41 PMnuhkoca
04/14/2022, 5:59 PMprivate object IconButtonSmallRipple : RippleTheme {
@Composable
override fun defaultColor(): Color = RippleTheme.defaultRippleColor(
contentColor = TRTheme.colors.primaryBlue2,
lightTheme = false
)
@Composable
override fun rippleAlpha(): RippleAlpha = RippleTheme.defaultRippleAlpha(
Color.Black,
lightTheme = !isSystemInDarkTheme()
)
}
CompositionLocalProvider(
LocalContentColor provides iconTint,
LocalRippleTheme provides IconButtonSmallRipple
) {
t = iconTint, enabled = enabled, onClick = onClick, content = content)
IconButton(
onClick = onClick,
enabled = enabled
) {
content()
}
}
Louis Pullen-Freilich [G]
04/14/2022, 6:03 PMlightTheme = false
and
lightTheme = !isSystemInDarkTheme()
These values should be driven by your theme itselfdefaultRippleColor
sometimes uses Color.White
- so that might be what is happening here, because you have set lightTheme = false all the time, it will try to use a white ripple, on a white surfacenuhkoca
04/15/2022, 6:05 PM