Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee446571 authored by Prince's avatar Prince Committed by Prince Donkor
Browse files

Update EmptyStateCta with solid background color

Update EmptyStateCta component to improve text visibility by:
- Replace transparent Card with solid primary color background
- Remove border stroke from Card
- Update text color to use onPrimary for better contrast
- Update button colors to use primaryContainer/onPrimaryContainer
- Maintain existing layout, spacing, and accessibility features

Bug: 378418098
Test: Device tested
Flag: NONE Accessibility fix
Change-Id: I0587a8a452a74481985c6f85d44f214946360661
parent dc082200
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -973,8 +973,11 @@ private fun EmptyStateCta(contentPadding: PaddingValues, viewModel: BaseCommunal
    val colors = MaterialTheme.colorScheme
    Card(
        modifier = Modifier.height(hubDimensions.GridHeight).padding(contentPadding),
        colors = CardDefaults.cardColors(containerColor = Color.Transparent),
        border = BorderStroke(3.adjustedDp, colors.secondary),
        colors =
            CardDefaults.cardColors(
                containerColor = colors.primary,
                contentColor = colors.onPrimary,
            ),
        shape = RoundedCornerShape(size = 80.adjustedDp),
    ) {
        Column(
@@ -988,20 +991,21 @@ private fun EmptyStateCta(contentPadding: PaddingValues, viewModel: BaseCommunal
                text = titleForEmptyStateCTA,
                style = MaterialTheme.typography.displaySmall,
                textAlign = TextAlign.Center,
                color = colors.primary,
                color = colors.onPrimary,
                modifier =
                    Modifier.focusable().semantics(mergeDescendants = true) {
                        contentDescription = titleForEmptyStateCTA
                        heading()
                    },
            )

            Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) {
                Button(
                    modifier = Modifier.height(56.dp),
                    colors =
                        ButtonDefaults.buttonColors(
                            containerColor = colors.primary,
                            contentColor = colors.onPrimary,
                            containerColor = colors.primaryContainer,
                            contentColor = colors.onPrimaryContainer,
                        ),
                    onClick = { viewModel.onOpenWidgetEditor(shouldOpenWidgetPickerOnStart = true) },
                ) {