Move Fab back action button to separate component. Adjust colors for the fabs in CustomListsScreen.
This commit is contained in:
+3
-2
@@ -32,6 +32,7 @@ import androidx.compose.foundation.pager.rememberPagerState
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.AlertDialog
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
|
import androidx.compose.material3.ButtonDefaults
|
||||||
import androidx.compose.material3.FloatingActionButton
|
import androidx.compose.material3.FloatingActionButton
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -227,7 +228,7 @@ private fun FollowSetFabsAndMenu(
|
|||||||
isListAdditionDialogOpen.value = true
|
isListAdditionDialogOpen.value = true
|
||||||
},
|
},
|
||||||
shape = CircleShape,
|
shape = CircleShape,
|
||||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
containerColor = ButtonDefaults.filledTonalButtonColors().containerColor,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(R.drawable.lock_plus),
|
painter = painterResource(R.drawable.lock_plus),
|
||||||
@@ -241,7 +242,7 @@ private fun FollowSetFabsAndMenu(
|
|||||||
isListAdditionDialogOpen.value = true
|
isListAdditionDialogOpen.value = true
|
||||||
},
|
},
|
||||||
shape = CircleShape,
|
shape = CircleShape,
|
||||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
containerColor = ButtonDefaults.filledTonalButtonColors().containerColor,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(R.drawable.earth_plus),
|
painter = painterResource(R.drawable.earth_plus),
|
||||||
|
|||||||
+25
-13
@@ -130,16 +130,7 @@ fun FollowSetsManagementDialog(
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
floatingActionButton = {
|
floatingActionButton = {
|
||||||
OutlinedButton(
|
BackActionButton { navigator.popBack() }
|
||||||
onClick = {
|
|
||||||
navigator.popBack()
|
|
||||||
},
|
|
||||||
shape = ButtonBorder,
|
|
||||||
colors = ButtonDefaults.filledTonalButtonColors(),
|
|
||||||
elevation = ButtonDefaults.elevatedButtonElevation(defaultElevation = 6.0.dp),
|
|
||||||
) {
|
|
||||||
Text(text = "Cancel", fontWeight = FontWeight.SemiBold)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
) { contentPadding ->
|
) { contentPadding ->
|
||||||
Column(
|
Column(
|
||||||
@@ -228,10 +219,27 @@ fun FollowSetsManagementDialog(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun BackActionButton(
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
|
onBack: () -> Unit,
|
||||||
|
) {
|
||||||
|
OutlinedButton(
|
||||||
|
onClick = onBack,
|
||||||
|
shape = ButtonBorder,
|
||||||
|
colors = ButtonDefaults.filledTonalButtonColors(),
|
||||||
|
elevation = ButtonDefaults.elevatedButtonElevation(defaultElevation = 6.0.dp),
|
||||||
|
) {
|
||||||
|
Text(text = "Back", fontWeight = FontWeight.SemiBold)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun Loading() {
|
private fun Loading() {
|
||||||
Column(
|
Column(
|
||||||
Modifier.fillMaxWidth().fillMaxHeight(0.5f),
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.fillMaxHeight(0.5f),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Center,
|
verticalArrangement = Arrangement.Center,
|
||||||
) {
|
) {
|
||||||
@@ -243,7 +251,9 @@ private fun Loading() {
|
|||||||
@Composable
|
@Composable
|
||||||
private fun EmptyOrNoneFound(onRefresh: () -> Unit) {
|
private fun EmptyOrNoneFound(onRefresh: () -> Unit) {
|
||||||
Column(
|
Column(
|
||||||
Modifier.fillMaxWidth().fillMaxHeight(0.5f),
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.fillMaxHeight(0.5f),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Center,
|
verticalArrangement = Arrangement.Center,
|
||||||
) {
|
) {
|
||||||
@@ -259,7 +269,9 @@ private fun ErrorMessage(
|
|||||||
onRefresh: () -> Unit,
|
onRefresh: () -> Unit,
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
Modifier.fillMaxWidth().fillMaxHeight(0.5f),
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.fillMaxHeight(0.5f),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Center,
|
verticalArrangement = Arrangement.Center,
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user