diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Scaffolding.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Scaffolding.kt index 872680489879..11613dfc4141 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Scaffolding.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/Scaffolding.kt @@ -12,7 +12,6 @@ import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.FabPosition import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold @@ -127,8 +126,6 @@ fun ScaffoldWithMediumTopBar( lazyListState: LazyListState = rememberLazyListState(), scrollbarColor: Color = MaterialTheme.colorScheme.onBackground.copy(alpha = AlphaScrollbar), snackbarHostState: SnackbarHostState = remember { SnackbarHostState() }, - floatingActionButton: @Composable () -> Unit = {}, - floatingActionButtonPosition: FabPosition = FabPosition.End, content: @Composable (modifier: Modifier, lazyListState: LazyListState) -> Unit ) { @@ -146,8 +143,6 @@ fun ScaffoldWithMediumTopBar( scrollBehavior = scrollBehavior ) }, - floatingActionButton = floatingActionButton, - floatingActionButtonPosition = floatingActionButtonPosition, snackbarHost = { SnackbarHost( snackbarHostState, diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt index 4e1d2cfdcc9f..20a92132f17d 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/CustomListsScreen.kt @@ -1,15 +1,11 @@ package net.mullvad.mullvadvpn.compose.screen -import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.foundation.lazy.LazyListState -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add -import androidx.compose.material3.ExtendedFloatingActionButton import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.SnackbarDuration import androidx.compose.material3.SnackbarHostState @@ -20,8 +16,10 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.compositeOver import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.lifecycle.compose.collectAsStateWithLifecycle @@ -47,7 +45,7 @@ import net.mullvad.mullvadvpn.compose.test.NEW_LIST_BUTTON_TEST_TAG import net.mullvad.mullvadvpn.compose.transitions.SlideInFromRightTransition import net.mullvad.mullvadvpn.lib.theme.AppTheme import net.mullvad.mullvadvpn.lib.theme.Dimens -import net.mullvad.mullvadvpn.lib.theme.shape.fabShape +import net.mullvad.mullvadvpn.lib.theme.color.Alpha60 import net.mullvad.mullvadvpn.relaylist.RelayItem import net.mullvad.mullvadvpn.viewmodel.CustomListsViewModel import org.koin.androidx.compose.koinViewModel @@ -124,20 +122,19 @@ fun CustomListsScreen( ScaffoldWithMediumTopBar( appBarTitle = stringResource(id = R.string.edit_custom_lists), navigationIcon = { NavigateBackIconButton(onBackClick) }, - floatingActionButton = { - ExtendedFloatingActionButton( + actions = { + IconButton( onClick = addCustomList, - containerColor = MaterialTheme.colorScheme.primary, - contentColor = MaterialTheme.colorScheme.onPrimary, - shape = MaterialTheme.shapes.fabShape, modifier = Modifier.testTag(NEW_LIST_BUTTON_TEST_TAG) ) { Icon( - imageVector = Icons.Filled.Add, + painterResource(id = R.drawable.ic_icons_add), + tint = + MaterialTheme.colorScheme.onBackground + .copy(alpha = Alpha60) + .compositeOver(MaterialTheme.colorScheme.background), contentDescription = stringResource(id = R.string.new_list) ) - Spacer(modifier = Modifier.width(Dimens.mediumPadding)) - Text(stringResource(id = R.string.new_list)) } }, snackbarHostState = snackbarHostState diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/color/Color.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/color/Color.kt index 82f924ebe0ee..01959b7934bb 100644 --- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/color/Color.kt +++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/color/Color.kt @@ -21,6 +21,7 @@ const val AlphaDescription = 0.6f const val AlphaDisconnectButton = 0.6f const val AlphaChevron = 0.6f const val AlphaScrollbar = 0.6f +const val Alpha60 = 0.6f const val AlphaTopBar = 0.8f const val AlphaInvisible = 0f