summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author burakov <burakov@google.com> 2025-03-19 09:12:31 +0000
committer burakov <burakov@google.com> 2025-03-20 08:00:06 +0000
commit1e2a4efd35cdc918baf09daf2d41517921657428 (patch)
treeb4096287304da4ad221de2f0205e1e7b23c4053a
parent084ae854aa0563663d1a4d4d820c99400c639f34 (diff)
[Dual Shade] Match surface and scrim colors with the SurfaceEffects spec
Fix: 404732145 Fix: 404484235 Test: Existing unit tests still pass. Test: Manually by opening and closing the notifications shade and quick settings shade and observing that the colors look as intended, in both light and dark mode, with notifications blur on and off. Flag: com.android.systemui.scene_container Change-Id: I55854205743dfde2ea95d345d89d9812b85064aa
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt
index b30e12f073ad..89c54bcc1ced 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt
@@ -37,7 +37,6 @@ import androidx.compose.foundation.layout.systemBarsIgnoringVisibility
import androidx.compose.foundation.layout.waterfall
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.overscroll
-import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
@@ -46,6 +45,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalLayoutDirection
+import androidx.compose.ui.platform.LocalResources
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
@@ -57,6 +57,8 @@ import com.android.mechanics.behavior.VerticalExpandContainerSpec
import com.android.mechanics.behavior.verticalExpandContainerBackground
import com.android.systemui.Flags
import com.android.systemui.res.R
+import com.android.systemui.shade.ui.ShadeColors.notificationScrim
+import com.android.systemui.shade.ui.ShadeColors.shadePanel
import com.android.systemui.shade.ui.composable.OverlayShade.rememberShadeExpansionMotion
/** Renders a lightweight shade UI container, as an overlay. */
@@ -190,17 +192,15 @@ object OverlayShade {
}
object Colors {
- val ScrimBackground = Color(0f, 0f, 0f, alpha = 0.3f)
+ val ScrimBackground: Color
+ @Composable
+ @ReadOnlyComposable
+ get() = Color(LocalResources.current.notificationScrim(Flags.notificationShadeBlur()))
+
val PanelBackground: Color
@Composable
@ReadOnlyComposable
- get() {
- return if (Flags.notificationShadeBlur()) {
- MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.4f)
- } else {
- MaterialTheme.colorScheme.surfaceContainer
- }
- }
+ get() = Color(LocalResources.current.shadePanel(Flags.notificationShadeBlur()))
}
object Dimensions {