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

Commit f8f030b3 authored by András Kurucz's avatar András Kurucz
Browse files

[Flexiglass] Add horizontal paddings to the SingleShade

Add horizontal paddings to the SingleShade, to match the looks of the
legacy design. It only affects wide screens.

Fixes: 364198236
Bug: 360064867
Test: open the shade in different orientations, and compare it with the
legacy behaviour side-by-side
Flag: com.android.systemui.scene_container

Change-Id: I96a5a4084efa4eebef1626b3f7371ffde46ff906
parent 1b6dd331
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -304,6 +304,8 @@ private fun SceneScope.SingleShade(
            viewModel.qsSceneAdapter,
        )
    }
    val shadeHorizontalPadding =
        dimensionResource(id = R.dimen.notification_panel_margin_horizontal)
    val shadeMeasurePolicy =
        remember(mediaInRow) {
            SingleShadeMeasurePolicy(
@@ -355,6 +357,7 @@ private fun SceneScope.SingleShade(
                Box(
                    Modifier.element(QuickSettings.Elements.QuickQuickSettings)
                        .layoutId(SingleShadeMeasurePolicy.LayoutId.QuickSettings)
                        .padding(horizontal = shadeHorizontalPadding)
                ) {
                    QuickSettings(
                        viewModel.qsSceneAdapter,
@@ -382,7 +385,9 @@ private fun SceneScope.SingleShade(
                    shouldPunchHoleBehindScrim = shouldPunchHoleBehindScrim,
                    onEmptySpaceClick =
                        viewModel::onEmptySpaceClicked.takeIf { isEmptySpaceClickable },
                    modifier = Modifier.layoutId(SingleShadeMeasurePolicy.LayoutId.Notifications),
                    modifier =
                        Modifier.layoutId(SingleShadeMeasurePolicy.LayoutId.Notifications)
                            .padding(horizontal = shadeHorizontalPadding),
                )
            },
            measurePolicy = shadeMeasurePolicy,