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

Commit 9eae7c4c authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Move chips behind the pill

When animating, the chips should disappear behind the pill, not on top
of it.

Test: visual
Flag: com.android.systemui.enable_underlay
Bug: 422203134
Change-Id: I25047bc7872a4321ffeb5ae33c5b8af79bb29f89
parent 7b2c493f
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -138,6 +138,17 @@ private fun TaskBarAnd3ButtonAmbientCue(
                translationY = screenHeightPx - size.height
            },
    )
    ActionList(
        actions = actions,
        visible = visible && expanded,
        onDismiss = { viewModel.collapse() },
        horizontalAlignment = Alignment.End,
        modifier =
            modifier.graphicsLayer {
                translationX = screenWidthPx - size.width - actionsHorizontalPaddingPx
                translationY = pillCenter.y - size.height - actionsVerticalPaddingPx
            },
    )
    ShortPill(
        actions = actions,
        visible = visible,
@@ -173,17 +184,6 @@ private fun TaskBarAnd3ButtonAmbientCue(
        onClick = { viewModel.expand() },
        onCloseClick = { viewModel.hide() },
    )
    ActionList(
        actions = actions,
        visible = visible && expanded,
        onDismiss = { viewModel.collapse() },
        horizontalAlignment = Alignment.End,
        modifier =
            modifier.graphicsLayer {
                translationX = screenWidthPx - size.width - actionsHorizontalPaddingPx
                translationY = pillCenter.y - size.height - actionsVerticalPaddingPx
            },
    )
}

@Composable
@@ -203,15 +203,6 @@ private fun NavBarAmbientCue(

    LaunchedEffect(expanded) { onShouldInterceptTouches(expanded, null) }
    BackgroundGlow(visible = visible, expanded = expanded, modifier = modifier)
    NavBarPill(
        actions = actions,
        navBarWidth = navBarWidth,
        visible = visible,
        expanded = expanded,
        modifier = modifier.padding(bottom = 4.dp),
        onClick = { viewModel.expand() },
        onCloseClick = { viewModel.hide() },
    )
    ActionList(
        actions = actions,
        visible = visible && expanded,
@@ -223,6 +214,15 @@ private fun NavBarAmbientCue(
                end = ACTIONS_HORIZONTAL_PADDING.dp,
            ),
    )
    NavBarPill(
        actions = actions,
        navBarWidth = navBarWidth,
        visible = visible,
        expanded = expanded,
        modifier = modifier.padding(bottom = 4.dp),
        onClick = { viewModel.expand() },
        onCloseClick = { viewModel.hide() },
    )
}

private const val NAV_BAR_WIDTH_DP = 108 // R.dimen.taskbar_stashed_small_screen from Launcher