@@ -14,16 +14,17 @@ import androidx.compose.runtime.Composable
14
14
import androidx.compose.ui.Modifier
15
15
import androidx.compose.ui.draw.alpha
16
16
import androidx.compose.ui.graphics.Color
17
- import androidx.compose.ui.graphics.compositeOver
18
17
import androidx.compose.ui.text.style.TextAlign
19
18
import androidx.compose.ui.text.style.TextOverflow
20
19
import androidx.compose.ui.tooling.preview.Preview
21
20
import androidx.compose.ui.unit.dp
22
21
import net.mullvad.mullvadvpn.lib.theme.AppTheme
23
22
import net.mullvad.mullvadvpn.lib.theme.Dimens
24
23
import net.mullvad.mullvadvpn.lib.theme.color.Alpha20
25
- import net.mullvad.mullvadvpn.lib.theme.color.AlphaInactive
26
24
import net.mullvad.mullvadvpn.lib.theme.color.AlphaInvisible
25
+ import net.mullvad.mullvadvpn.lib.theme.color.errorDisabled
26
+ import net.mullvad.mullvadvpn.lib.theme.color.primaryDisabled
27
+ import net.mullvad.mullvadvpn.lib.theme.color.tertiaryDisabled
27
28
28
29
@Preview
29
30
@Composable
@@ -71,7 +72,7 @@ fun NegativeButton(
71
72
containerColor = MaterialTheme .colorScheme.error,
72
73
contentColor = MaterialTheme .colorScheme.onError,
73
74
disabledContentColor = MaterialTheme .colorScheme.onError.copy(alpha = Alpha20 ),
74
- disabledContainerColor = MaterialTheme .colorScheme.error.copy(alpha = AlphaInactive )
75
+ disabledContainerColor = MaterialTheme .colorScheme.errorDisabled
75
76
),
76
77
isEnabled : Boolean = true,
77
78
icon : @Composable (() -> Unit )? = null
@@ -97,7 +98,7 @@ fun VariantButton(
97
98
containerColor = background,
98
99
contentColor = MaterialTheme .colorScheme.onTertiary,
99
100
disabledContentColor = MaterialTheme .colorScheme.onTertiary.copy(alpha = Alpha20 ),
100
- disabledContainerColor = background.copy(alpha = AlphaInactive ) ,
101
+ disabledContainerColor = MaterialTheme .colorScheme.tertiaryDisabled ,
101
102
),
102
103
isEnabled : Boolean = true,
103
104
icon : @Composable (() -> Unit )? = null
@@ -121,14 +122,8 @@ fun PrimaryButton(
121
122
ButtonDefaults .buttonColors(
122
123
containerColor = MaterialTheme .colorScheme.primary,
123
124
contentColor = MaterialTheme .colorScheme.onPrimary,
124
- disabledContentColor =
125
- MaterialTheme .colorScheme.onPrimary
126
- .copy(alpha = Alpha20 )
127
- .compositeOver(MaterialTheme .colorScheme.background),
128
- disabledContainerColor =
129
- MaterialTheme .colorScheme.primary
130
- .copy(alpha = AlphaInactive )
131
- .compositeOver(MaterialTheme .colorScheme.background),
125
+ disabledContentColor = MaterialTheme .colorScheme.onPrimary.copy(alpha = Alpha20 ),
126
+ disabledContainerColor = MaterialTheme .colorScheme.primaryDisabled,
132
127
),
133
128
isEnabled : Boolean = true,
134
129
leadingIcon : @Composable (() -> Unit )? = null,
0 commit comments