From 164269ef7649137ad71ab16ea7154a77ab25bfa1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 21 Nov 2023 16:53:03 +0100 Subject: [PATCH] No need to have a SemanticColors parameter. --- .../textcomposer/components/FormattingOption.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt index e7b1ccadac..8c1b099930 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt @@ -38,7 +38,6 @@ import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.iconSuccessPrimaryBackground import io.element.android.libraries.designsystem.utils.CommonDrawables import io.element.android.libraries.theme.ElementTheme -import io.element.android.libraries.theme.compound.generated.SemanticColors @Composable internal fun FormattingOption( @@ -47,18 +46,17 @@ internal fun FormattingOption( imageVector: ImageVector, contentDescription: String?, modifier: Modifier = Modifier, - colors: SemanticColors = ElementTheme.colors, ) { val backgroundColor = when (state) { - FormattingOptionState.Selected -> colors.iconSuccessPrimaryBackground + FormattingOptionState.Selected -> ElementTheme.colors.iconSuccessPrimaryBackground FormattingOptionState.Default, FormattingOptionState.Disabled -> Color.Transparent } val foregroundColor = when (state) { - FormattingOptionState.Selected -> colors.iconSuccessPrimary - FormattingOptionState.Default -> colors.iconSecondary - FormattingOptionState.Disabled -> colors.iconDisabled + FormattingOptionState.Selected -> ElementTheme.colors.iconSuccessPrimary + FormattingOptionState.Default -> ElementTheme.colors.iconSecondary + FormattingOptionState.Disabled -> ElementTheme.colors.iconDisabled } Box( modifier = modifier