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

Commit 5af1da80 authored by Tianfan Zhang's avatar Tianfan Zhang
Browse files

Fix action list appearing bug in landscape 3btn mode.

Bug: 434825064
Test: Manual
Flag: EXEMPT bugfix
Change-Id: Ie38d3c3ae2a893fd438d3866257e5ee36ae90728
parent cd30839e
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ fun ActionList(
    padding: PaddingValues = PaddingValues(0.dp),
    horizontalAlignment: Alignment.Horizontal = Alignment.CenterHorizontally,
    portrait: Boolean = true,
    pillCenter: Offset = Offset.Zero,
    pillOffset: Float = 0f,
    rotation: Int = 0,
) {
    val density = LocalDensity.current
@@ -343,15 +343,22 @@ fun ActionList(
                            chipWidthPx = it.width
                        }
                        .graphicsLayer {
                            val chipsTotalHeightPx =
                                childHeights.sum().toFloat() +
                                    columnSpacingPx * (childHeights.size - 1)
                            if (portrait) {
                                translationY = (1f - translation) * appxColumnY
                                translationX = 0f
                            } else {
                                if (rotation == ROTATION_90) {
                                    translationY = (1f - translation) * (appxColumnY - pillCenter.y)
                                    translationY =
                                        (1f - translation) *
                                            (pillOffset - chipsTotalHeightPx + appxColumnY)
                                    translationX = (1f - translation) * chipWidthPx.toFloat()
                                } else if (rotation == ROTATION_270) {
                                    translationY = (1f - translation) * (appxColumnY - pillCenter.y)
                                    translationY =
                                        (1f - translation) *
                                            (pillOffset - chipsTotalHeightPx + appxColumnY)
                                    translationX = (translation - 1f) * chipWidthPx.toFloat()
                                }
                            }
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ private fun TaskBarAnd3ButtonAmbientCue(
                }
            },
        portrait = portrait,
        pillCenter = pillCenter,
        pillOffset = pillCenter.y - pillSize.width,
        rotation = rotation,
    )
    ShortPill(