diff options
5 files changed, 20 insertions, 30 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/SwitchLocationButton.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/SwitchLocationButton.kt index 48b6a1ca52..7ab5831e47 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/SwitchLocationButton.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/SwitchLocationButton.kt @@ -34,8 +34,8 @@ fun SwitchLocationButton( onClick = onClick, colors = ButtonDefaults.buttonColors( - containerColor = MaterialTheme.colorScheme.onSurface.copy(alpha = Alpha20), - contentColor = MaterialTheme.colorScheme.onSurface + containerColor = MaterialTheme.colorScheme.primaryContainer, + contentColor = MaterialTheme.colorScheme.onPrimaryContainer ), modifier = modifier, text = text, diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt index 3877e9bfc0..3e0aeaedef 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/CustomPortCell.kt @@ -31,6 +31,7 @@ import net.mullvad.mullvadvpn.lib.theme.AppTheme import net.mullvad.mullvadvpn.lib.theme.Dimens import net.mullvad.mullvadvpn.lib.theme.color.AlphaInvisible import net.mullvad.mullvadvpn.lib.theme.color.AlphaVisible +import net.mullvad.mullvadvpn.lib.theme.color.onSelected import net.mullvad.mullvadvpn.lib.theme.color.selected @Preview @@ -70,7 +71,7 @@ fun CustomPortCell( if (isSelected) { MaterialTheme.colorScheme.selected } else { - MaterialTheme.colorScheme.primaryContainer + MaterialTheme.colorScheme.surfaceContainerLow } ) .padding(start = Dimens.cellStartPadding) @@ -79,7 +80,7 @@ fun CustomPortCell( Icon( painter = painterResource(id = R.drawable.icon_tick), contentDescription = null, - tint = MaterialTheme.colorScheme.onSecondary, + tint = MaterialTheme.colorScheme.onSelected, modifier = Modifier.padding(end = Dimens.selectableCellTextMargin) .alpha(if (isSelected) AlphaVisible else AlphaInvisible) @@ -89,9 +90,9 @@ fun CustomPortCell( style = MaterialTheme.typography.labelLarge, textAlign = TextAlign.Start, textColor = if (isSelected) { - MaterialTheme.colorScheme.onSecondary + MaterialTheme.colorScheme.onSelected } else { - MaterialTheme.colorScheme.onPrimaryContainer + MaterialTheme.colorScheme.onSurface } ) } @@ -102,12 +103,12 @@ fun CustomPortCell( .height(Dimens.cellHeight) .wrapContentWidth() .defaultMinSize(minWidth = Dimens.customPortBoxMinWidth) - .background(MaterialTheme.colorScheme.primary) + .background(MaterialTheme.colorScheme.surfaceContainerHighest) .testTag(numberTestTag) ) { Text( text = port?.value?.toString() ?: stringResource(id = R.string.port), - color = MaterialTheme.colorScheme.onPrimary, + color = MaterialTheme.colorScheme.onSurface, modifier = Modifier.align(Alignment.Center) ) } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt index 15f40ed153..7e172706a4 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt @@ -56,9 +56,9 @@ fun SelectableCell( titleStyle: TextStyle = MaterialTheme.typography.labelLarge, startPadding: Dp = Dimens.cellStartPadding, selectedColor: Color = MaterialTheme.colorScheme.selected, - backgroundColor: Color = MaterialTheme.colorScheme.primaryContainer, + backgroundColor: Color = MaterialTheme.colorScheme.surfaceContainerLow, onSelectedColor: Color = MaterialTheme.colorScheme.onSelected, - onBackgroundColor: Color = MaterialTheme.colorScheme.onPrimaryContainer, + onBackgroundColor: Color = MaterialTheme.colorScheme.onSurface, onCellClicked: () -> Unit = {}, testTag: String = "" ) { diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Switch.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Switch.kt index 2492478463..e055270ef9 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Switch.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Switch.kt @@ -15,7 +15,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.compositeOver import androidx.compose.ui.tooling.preview.Preview import net.mullvad.mullvadvpn.lib.theme.AppTheme import net.mullvad.mullvadvpn.lib.theme.Dimens @@ -69,28 +68,18 @@ fun mullvadSwitchColors(): SwitchColors = SwitchDefaults.colors( checkedThumbColor = MaterialTheme.colorScheme.selected, checkedTrackColor = Color.Transparent, - checkedBorderColor = MaterialTheme.colorScheme.onPrimary, + checkedBorderColor = MaterialTheme.colorScheme.onSurface, // checkedIconColor= SwitchTokens.SelectedIconColor.toColor(), uncheckedThumbColor = MaterialTheme.colorScheme.error, uncheckedTrackColor = Color.Transparent, - uncheckedBorderColor = MaterialTheme.colorScheme.onPrimary, + uncheckedBorderColor = MaterialTheme.colorScheme.onSurface, // uncheckedIconColor= SwitchTokens.UnselectedIconColor.toColor(), - disabledCheckedThumbColor = - MaterialTheme.colorScheme.selected - .copy(alpha = AlphaDisabled) - .compositeOver(MaterialTheme.colorScheme.primary), + disabledCheckedThumbColor = MaterialTheme.colorScheme.selected.copy(alpha = AlphaDisabled), disabledCheckedTrackColor = Color.Transparent, disabledCheckedBorderColor = - MaterialTheme.colorScheme.onPrimary - .copy(alpha = AlphaDisabled) - .compositeOver(MaterialTheme.colorScheme.primary), - disabledUncheckedThumbColor = - MaterialTheme.colorScheme.error - .copy(alpha = AlphaDisabled) - .compositeOver(MaterialTheme.colorScheme.primary), + MaterialTheme.colorScheme.onSurface.copy(alpha = AlphaDisabled), + disabledUncheckedThumbColor = MaterialTheme.colorScheme.error.copy(alpha = AlphaDisabled), disabledUncheckedTrackColor = Color.Transparent, disabledUncheckedBorderColor = - MaterialTheme.colorScheme.onPrimary - .copy(alpha = AlphaDisabled) - .compositeOver(MaterialTheme.colorScheme.primary), + MaterialTheme.colorScheme.onSurface.copy(alpha = AlphaDisabled) ) diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt index b6da64ea86..545210eadb 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt @@ -311,7 +311,7 @@ private fun MapColumn( markers = markers, globeColors = GlobeColors( - landColor = MaterialTheme.colorScheme.onSurface, + landColor = MaterialTheme.colorScheme.primary, oceanColor = MaterialTheme.colorScheme.surface, ) ) @@ -346,7 +346,7 @@ private fun ConnectionInfo(state: ConnectUiState) { Text( text = state.location?.country ?: "", style = MaterialTheme.typography.headlineLarge, - color = MaterialTheme.colorScheme.onPrimary, + color = MaterialTheme.colorScheme.onSurface, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(horizontal = Dimens.sideMargin) @@ -354,7 +354,7 @@ private fun ConnectionInfo(state: ConnectUiState) { Text( text = state.location?.city ?: "", style = MaterialTheme.typography.headlineLarge, - color = MaterialTheme.colorScheme.onPrimary, + color = MaterialTheme.colorScheme.onSurface, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(horizontal = Dimens.sideMargin) |
