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

Commit 58abacce authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Merge remote-tracking branch 'origin/v3.0-a15' into a15

parents c592c3a9 91174c12
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -239,9 +239,9 @@ fun SceneScope.CommunalScene(
                )
    ) {
        when (backgroundType) {
            CommunalBackgroundType.STATIC -> DefaultBackground(colors = colors)
            CommunalBackgroundType.STATIC_GRADIENT -> StaticLinearGradient()
            CommunalBackgroundType.ANIMATED -> AnimatedLinearGradient()
            CommunalBackgroundType.STATIC -> BackgroundTopScrim()
            CommunalBackgroundType.STATIC_GRADIENT -> BackgroundTopScrim()
            CommunalBackgroundType.ANIMATED -> BackgroundTopScrim()
            CommunalBackgroundType.NONE -> BackgroundTopScrim()
        }

@@ -297,8 +297,8 @@ private fun BoxScope.AnimatedLinearGradient() {
@Composable
private fun BoxScope.BackgroundTopScrim() {
    val darkTheme = isSystemInDarkTheme()
    val scrimOnTopColor = if (darkTheme) Color.Black else Color.White
    Box(Modifier.matchParentSize().alpha(0.34f).background(scrimOnTopColor))
    val scrimOnTopColor = MaterialTheme.colorScheme.surface
    Box(Modifier.matchParentSize().background(scrimOnTopColor))
}

/** The duration to use for the gradient background animation. */
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ constructor(
                    }
                    with(lockSection) {
                        LockIcon(
                            overrideColor = MaterialTheme.colorScheme.onPrimaryContainer,
                            overrideColor = MaterialTheme.colorScheme.primary,
                            modifier = Modifier.element(Communal.Elements.LockIcon),
                        )
                    }
+7 −7
Original line number Diff line number Diff line
@@ -988,7 +988,7 @@ private fun EmptyStateCta(contentPadding: PaddingValues, viewModel: BaseCommunal
                text = titleForEmptyStateCTA,
                style = MaterialTheme.typography.displaySmall,
                textAlign = TextAlign.Center,
                color = colors.primary,
                color = colors.onSurface,
                modifier =
                    Modifier.focusable().semantics(mergeDescendants = true) {
                        contentDescription = titleForEmptyStateCTA
@@ -1059,7 +1059,7 @@ private fun Toolbar(
    ) {
        val addWidgetText = stringResource(R.string.hub_mode_add_widget_button_text)
        ToolbarButton(
            isPrimary = !removeEnabled,
            isPrimary = true,
            modifier = Modifier.align(Alignment.CenterStart),
            onClick = onOpenWidgetPicker,
        ) {
@@ -1102,7 +1102,7 @@ private fun Toolbar(
        }

        ToolbarButton(
            isPrimary = !removeEnabled,
            isPrimary = true,
            modifier = Modifier.align(Alignment.CenterEnd),
            onClick = onEditDone,
        ) {
@@ -1254,7 +1254,7 @@ private fun CtaTileInViewModeContent(
        colors =
            CardDefaults.cardColors(
                containerColor = colors.primary,
                contentColor = colors.onPrimary,
                contentColor = colors.surface,
            ),
        shape = RoundedCornerShape(68.adjustedDp, 34.adjustedDp, 68.adjustedDp, 34.adjustedDp),
    ) {
@@ -1294,7 +1294,7 @@ private fun CtaTileInViewModeContent(
                    OutlinedButton(
                        modifier = Modifier.fillMaxHeight().weight(1F),
                        colors = ButtonDefaults.buttonColors(contentColor = colors.onPrimary),
                        border = BorderStroke(width = 1.0.dp, color = colors.primaryContainer),
                        border = BorderStroke(width = 1.0.dp, color = colors.primary),
                        onClick = viewModel::onDismissCtaTile,
                        contentPadding = PaddingValues(0.dp, 0.dp, 0.dp, 0.dp),
                    ) {
@@ -1307,8 +1307,8 @@ private fun CtaTileInViewModeContent(
                        modifier = Modifier.fillMaxHeight().weight(1F),
                        colors =
                            ButtonDefaults.buttonColors(
                                containerColor = colors.primaryContainer,
                                contentColor = colors.onPrimaryContainer,
                                containerColor = colors.surface,
                                contentColor = colors.primary,
                            ),
                        onClick = viewModel::onOpenWidgetEditor,
                        contentPadding = PaddingValues(0.dp, 0.dp, 0.dp, 0.dp),