diff options
| author | 2025-01-09 23:22:51 -0800 | |
|---|---|---|
| committer | 2025-01-13 16:18:44 -0800 | |
| commit | 852d9a176c78367ea4c0b79ddf308077b44481d2 (patch) | |
| tree | 9e5d3fb2c26c458a857b311e1100468f288fe644 | |
| parent | e452657bd578d6508e71efa3d5f517b4488505c4 (diff) | |
Make QS footer actions transparent
Flag: com.android.systemui.notification_shade_blur
Fixes: 388891139
Test: screenshot in the bug
Change-Id: I19198404bc0386829a30bd06281194c34a5d3f1e
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt index f7ce2153b0ec..7f7273d710a1 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt @@ -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), ) } } |