Skip to content

Commit f0dae10

Browse files
committed
Restore buttons
1 parent 0225d69 commit f0dae10

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/ConnectionButton.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fun ConnectionButton(
5454
MaterialTheme.colorScheme.tertiary
5555
} else {
5656
// TODO Should we make this transparent or not?
57-
MaterialTheme.colorScheme.error // .copy(alpha = AlphaDisconnectButton)
57+
MaterialTheme.colorScheme.error.copy(alpha = AlphaDisconnectButton)
5858
}
5959

6060
val contentColor =

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/button/SwitchLocationButton.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import androidx.compose.ui.tooling.preview.Preview
1010
import net.mullvad.mullvadvpn.R
1111
import net.mullvad.mullvadvpn.compose.component.SpacedColumn
1212
import net.mullvad.mullvadvpn.lib.theme.AppTheme
13+
import net.mullvad.mullvadvpn.lib.theme.color.Alpha20
1314

1415
@Preview
1516
@Composable
@@ -33,8 +34,8 @@ fun SwitchLocationButton(
3334
onClick = onClick,
3435
colors =
3536
ButtonDefaults.buttonColors(
36-
containerColor = MaterialTheme.colorScheme.primaryContainer,
37-
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
37+
containerColor = MaterialTheme.colorScheme.onPrimary.copy(alpha = Alpha20),
38+
contentColor = MaterialTheme.colorScheme.onPrimary
3839
),
3940
modifier = modifier,
4041
text = text,

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt

+1-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import androidx.compose.runtime.remember
1616
import androidx.compose.runtime.rememberCoroutineScope
1717
import androidx.compose.ui.Alignment
1818
import androidx.compose.ui.Modifier
19-
import androidx.compose.ui.graphics.compositeOver
2019
import androidx.compose.ui.platform.LocalContext
2120
import androidx.compose.ui.platform.testTag
2221
import androidx.compose.ui.res.painterResource
@@ -50,7 +49,6 @@ import net.mullvad.mullvadvpn.compose.util.showSnackbarImmediately
5049
import net.mullvad.mullvadvpn.lib.model.CustomList
5150
import net.mullvad.mullvadvpn.lib.theme.AppTheme
5251
import net.mullvad.mullvadvpn.lib.theme.Dimens
53-
import net.mullvad.mullvadvpn.lib.theme.color.Alpha60
5452
import net.mullvad.mullvadvpn.viewmodel.CustomListsViewModel
5553
import org.koin.androidx.compose.koinViewModel
5654

@@ -131,10 +129,7 @@ fun CustomListsScreen(
131129
) {
132130
Icon(
133131
painterResource(id = R.drawable.ic_icons_add),
134-
tint =
135-
MaterialTheme.colorScheme.onBackground
136-
.copy(alpha = Alpha60)
137-
.compositeOver(MaterialTheme.colorScheme.background),
132+
tint = MaterialTheme.colorScheme.onSurface,
138133
contentDescription = stringResource(id = R.string.new_list)
139134
)
140135
}

android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/color/Color.kt

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const val AlphaInactive = 0.4f
1515
const val Alpha40 = 0.4f
1616
const val AlphaDisconnectButton = 0.6f
1717
const val AlphaScrollbar = 0.6f
18-
const val Alpha60 = 0.6f
1918
const val AlphaInvisible = 0f
2019

2120
// Custom colors, they only link to normal material 3 colors for now

0 commit comments

Comments
 (0)