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

Commit 852d9a17 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Make QS footer actions transparent

Flag: com.android.systemui.notification_shade_blur
Fixes: 388891139
Test: screenshot in the bug
Change-Id: I19198404bc0386829a30bd06281194c34a5d3f1e
parent e452657b
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ import com.android.compose.animation.Expandable
import com.android.compose.animation.scene.SceneScope
import com.android.compose.modifiers.fadingBackground
import com.android.compose.theme.colorAttr
import com.android.systemui.Flags.notificationShadeBlur
import com.android.systemui.animation.Expandable
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.common.ui.compose.Icon
@@ -163,14 +164,16 @@ fun FooterActions(
        }
    }

    val backgroundColor = colorAttr(R.attr.underSurface)
    val backgroundColor =
        if (!notificationShadeBlur()) colorAttr(R.attr.underSurface) else Color.Transparent
    val backgroundAlphaValue = if (!notificationShadeBlur()) backgroundAlpha::value else ({ 0f })
    val contentColor = MaterialTheme.colorScheme.onSurface
    val backgroundTopRadius = dimensionResource(R.dimen.qs_corner_radius)
    val backgroundModifier =
        remember(backgroundColor, backgroundAlpha, backgroundTopRadius) {
        remember(backgroundColor, backgroundAlphaValue, backgroundTopRadius) {
            Modifier.fadingBackground(
                backgroundColor,
                backgroundAlpha::value,
                backgroundAlphaValue,
                RoundedCornerShape(topStart = backgroundTopRadius, topEnd = backgroundTopRadius),
            )
        }
@@ -305,7 +308,8 @@ private fun NumberButton(
    ) {
        Box(Modifier.size(40.dp)) {
            Box(
                Modifier.fillMaxSize()
                Modifier
                    .fillMaxSize()
                    .clip(CircleShape)
                    .indication(interactionSource, LocalIndication.current)
            ) {
@@ -333,7 +337,9 @@ private fun NewChangesDot(modifier: Modifier = Modifier) {
    val contentDescription = stringResource(R.string.fgs_dot_content_description)
    val color = MaterialTheme.colorScheme.tertiary

    Canvas(modifier.size(12.dp).semantics { this.contentDescription = contentDescription }) {
    Canvas(modifier
        .size(12.dp)
        .semantics { this.contentDescription = contentDescription }) {
        drawCircle(color)
    }
}
@@ -362,7 +368,9 @@ private fun TextButton(
            Modifier.padding(horizontal = dimensionResource(R.dimen.qs_footer_padding)),
            verticalAlignment = Alignment.CenterVertically,
        ) {
            Icon(icon, Modifier.padding(end = 12.dp).size(20.dp))
            Icon(icon, Modifier
                .padding(end = 12.dp)
                .size(20.dp))

            Text(
                text,
@@ -383,7 +391,9 @@ private fun TextButton(
                Icon(
                    painterResource(com.android.internal.R.drawable.ic_chevron_end),
                    contentDescription = null,
                    Modifier.padding(start = 8.dp).size(20.dp),
                    Modifier
                        .padding(start = 8.dp)
                        .size(20.dp),
                )
            }
        }