mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Use better ButtonDefaults method.
It should not change anything since we are providing the 4 parameters
This commit is contained in:
+3
-3
@@ -294,7 +294,7 @@ internal enum class ButtonStyle {
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun getColors(destructive: Boolean): ButtonColors = when (this) {
|
fun getColors(destructive: Boolean): ButtonColors = when (this) {
|
||||||
Filled -> ButtonDefaults.buttonColors(
|
Filled -> ButtonDefaults.filledTonalButtonColors(
|
||||||
containerColor = getPrimaryColor(destructive),
|
containerColor = getPrimaryColor(destructive),
|
||||||
contentColor = ElementTheme.materialColors.onPrimary,
|
contentColor = ElementTheme.materialColors.onPrimary,
|
||||||
disabledContainerColor = if (destructive) {
|
disabledContainerColor = if (destructive) {
|
||||||
@@ -304,13 +304,13 @@ internal enum class ButtonStyle {
|
|||||||
},
|
},
|
||||||
disabledContentColor = ElementTheme.colors.textOnSolidPrimary
|
disabledContentColor = ElementTheme.colors.textOnSolidPrimary
|
||||||
)
|
)
|
||||||
Outlined -> ButtonDefaults.buttonColors(
|
Outlined -> ButtonDefaults.outlinedButtonColors(
|
||||||
containerColor = Color.Transparent,
|
containerColor = Color.Transparent,
|
||||||
contentColor = getPrimaryColor(destructive),
|
contentColor = getPrimaryColor(destructive),
|
||||||
disabledContainerColor = Color.Transparent,
|
disabledContainerColor = Color.Transparent,
|
||||||
disabledContentColor = getDisabledContentColor(destructive),
|
disabledContentColor = getDisabledContentColor(destructive),
|
||||||
)
|
)
|
||||||
Text -> ButtonDefaults.buttonColors(
|
Text -> ButtonDefaults.textButtonColors(
|
||||||
containerColor = Color.Transparent,
|
containerColor = Color.Transparent,
|
||||||
contentColor = if (destructive) {
|
contentColor = if (destructive) {
|
||||||
ElementTheme.colors.textCriticalPrimary
|
ElementTheme.colors.textCriticalPrimary
|
||||||
|
|||||||
Reference in New Issue
Block a user