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

Commit 43b05634 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Large clock not clipping away" into main

parents 1ac8ad10 3242e767
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import androidx.compose.ui.unit.IntRect
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.animation.scene.SceneScope
import com.android.compose.modifiers.padding
import com.android.compose.modifiers.thenIf
import com.android.systemui.compose.modifiers.sysuiResTag
import com.android.systemui.keyguard.ui.composable.LockscreenLongPress
import com.android.systemui.keyguard.ui.composable.section.AmbientIndicationSection
@@ -97,16 +96,13 @@ constructor(
                            )
                        }

                        Box {
                        Box(modifier = Modifier.fillMaxWidth()) {
                            with(topAreaSection) {
                                DefaultClockLayout(
                                    smartSpacePaddingTop = viewModel::getSmartSpacePaddingTop,
                                    isShadeLayoutWide = isShadeLayoutWide,
                                    modifier =
                                        Modifier.thenIf(isShadeLayoutWide) {
                                                Modifier.fillMaxWidth(0.5f)
                                            }
                                            .graphicsLayer {
                                        Modifier.fillMaxWidth().graphicsLayer {
                                            translationX = unfoldTranslations.start
                                        },
                                )
+14 −10
Original line number Diff line number Diff line
@@ -81,10 +81,7 @@ constructor(
                    .padding(horizontal = dimensionResource(R.dimen.clock_padding_start))
                    .padding(top = { smallTopMargin })
                    .onTopPlacementChanged(onTopChanged)
                    .burnInAware(
                        viewModel = aodBurnInViewModel,
                        params = burnInParams,
                    )
                    .burnInAware(viewModel = aodBurnInViewModel, params = burnInParams)
                    .element(smallClockElementKey),
        )
    }
@@ -114,10 +111,7 @@ constructor(
            val dir = if (transition.toContent == splitShadeLargeClockScene) -1f else 1f
            val distance = dir * getClockCenteringDistance()
            val largeClock = checkNotNull(currentClock).largeClock
            largeClock.animations.onPositionUpdated(
                distance = distance,
                fraction = progress,
            )
            largeClock.animations.onPositionUpdated(distance = distance, fraction = progress)
        }

        Element(key = largeClockElementKey, modifier = modifier) {
@@ -125,6 +119,16 @@ constructor(
                AndroidView(
                    factory = { context ->
                        FrameLayout(context).apply {
                            // By default, ViewGroups like FrameLayout clip their children. Turning
                            // off the clipping allows the child view to render outside of its
                            // bounds - letting the step animation of the clock push the digits out
                            // when needed.
                            //
                            // Note that, in Compose, clipping is actually disabled by default so
                            // there's no need to propagate this up the composable hierarchy.
                            clipChildren = false
                            clipToPadding = false

                            ensureClockViewExists(checkNotNull(currentClock).largeClock.view)
                        }
                    },
@@ -136,8 +140,8 @@ constructor(
                            .burnInAware(
                                viewModel = aodBurnInViewModel,
                                params = burnInParams,
                                isClock = true
                            )
                                isClock = true,
                            ),
                )
            }
        }