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

Commit 9d918339 authored by burakov's avatar burakov Committed by Danny Burakov
Browse files

[Dual Shade] Adapt shade colors and transparency to match the UX spec.

Bug: 370556579
Bug: 388470180
Test: Manually by opening the quick settings shade and verifying the
 colors appear as expected.
Test: Existing unit tests still pass.
Flag: com.android.systemui.scene_container
Change-Id: I1cf7a2f2aa906c80594bdc5506a655a33c583aa5
parent 771c6c3e
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ import com.android.compose.animation.scene.LowestZIndexContentPicker
import com.android.compose.windowsizeclass.LocalWindowSizeClass
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.composable.OverlayShade.rememberShadeExpansionMotion

@@ -189,9 +190,17 @@ object OverlayShade {
    }

    object Colors {
        val ScrimBackground = Color(0f, 0f, 0f, alpha = 0.2f)
        val ScrimBackground = Color(0f, 0f, 0f, alpha = 0.3f)
        val PanelBackground: Color
            @Composable @ReadOnlyComposable get() = MaterialTheme.colorScheme.surfaceContainer
            @Composable
            @ReadOnlyComposable
            get() {
                return if (Flags.notificationShadeBlur()) {
                    MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.4f)
                } else {
                    MaterialTheme.colorScheme.surfaceContainer
                }
            }
    }

    object Dimensions {
+6 −4
Original line number Diff line number Diff line
@@ -276,15 +276,17 @@ constructor(

        data object Weak : HeaderChipHighlight {
            override fun backgroundColor(colorScheme: ColorScheme): Color =
                colorScheme.primary.copy(alpha = 0.1f)
                colorScheme.surface.copy(alpha = 0.1f)

            override fun foregroundColor(colorScheme: ColorScheme): Color = colorScheme.primary
            override fun foregroundColor(colorScheme: ColorScheme): Color = colorScheme.onSurface
        }

        data object Strong : HeaderChipHighlight {
            override fun backgroundColor(colorScheme: ColorScheme): Color = colorScheme.secondary
            override fun backgroundColor(colorScheme: ColorScheme): Color =
                colorScheme.primaryContainer

            override fun foregroundColor(colorScheme: ColorScheme): Color = colorScheme.onSecondary
            override fun foregroundColor(colorScheme: ColorScheme): Color =
                colorScheme.onPrimaryContainer
        }
    }