mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Fix supportingColor not correct on Destructive ListItem.
This commit is contained in:
committed by
Benoit Marty
parent
a613fcfe9d
commit
28eb7766dd
+2
@@ -103,6 +103,7 @@ fun ListItem(
|
|||||||
) {
|
) {
|
||||||
// We cannot just pass the disabled colors, they must be set manually: https://issuetracker.google.com/issues/280480132
|
// We cannot just pass the disabled colors, they must be set manually: https://issuetracker.google.com/issues/280480132
|
||||||
val headlineColor = if (enabled) colors.headlineColor else colors.disabledHeadlineColor
|
val headlineColor = if (enabled) colors.headlineColor else colors.disabledHeadlineColor
|
||||||
|
val supportingColor = if (enabled) colors.supportingTextColor else colors.disabledHeadlineColor.copy(alpha = 0.80f)
|
||||||
val leadingContentColor = if (enabled) colors.leadingIconColor else colors.disabledLeadingIconColor
|
val leadingContentColor = if (enabled) colors.leadingIconColor else colors.disabledLeadingIconColor
|
||||||
val trailingContentColor = if (enabled) colors.trailingIconColor else colors.disabledTrailingIconColor
|
val trailingContentColor = if (enabled) colors.trailingIconColor else colors.disabledTrailingIconColor
|
||||||
|
|
||||||
@@ -118,6 +119,7 @@ fun ListItem(
|
|||||||
{
|
{
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalTextStyle provides ElementTheme.materialTypography.bodyMedium,
|
LocalTextStyle provides ElementTheme.materialTypography.bodyMedium,
|
||||||
|
LocalContentColor provides supportingColor,
|
||||||
) {
|
) {
|
||||||
content()
|
content()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user