diff options
author | 2024-11-05 15:53:13 +0000 | |
---|---|---|
committer | 2024-11-05 15:53:13 +0000 | |
commit | f812c9b876b60b57bf40985bca73e563d14d05b5 (patch) | |
tree | 3b5c5eac922b87c57be4f841cac0e9d50e20aa73 | |
parent | 6e776a247695058f22000509916b7efacf33a867 (diff) | |
parent | 0fbbba1c46bb4af0ab279a831e87c12cd9345f86 (diff) |
Merge "Rename PropertyTransformation.transform.value to idleValue" into main
8 files changed, 25 insertions, 25 deletions
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredSize.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredSize.kt index 5936d2595465..0ddeb7c7445f 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredSize.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredSize.kt @@ -33,7 +33,7 @@ internal class AnchoredSize( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: IntSize, + idleValue: IntSize, ): IntSize { fun anchorSizeIn(content: ContentKey): IntSize { val size = @@ -45,8 +45,8 @@ internal class AnchoredSize( ) return IntSize( - width = if (anchorWidth) size.width else value.width, - height = if (anchorHeight) size.height else value.height, + width = if (anchorWidth) size.width else idleValue.width, + height = if (anchorHeight) size.height else idleValue.height, ) } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredTranslate.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredTranslate.kt index 0a59dfe515fc..47508b41633c 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredTranslate.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/AnchoredTranslate.kt @@ -31,7 +31,7 @@ internal class AnchoredTranslate( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: Offset, + idleValue: Offset, ): Offset { fun throwException(content: ContentKey?): Nothing { throwMissingAnchorException( @@ -51,9 +51,9 @@ internal class AnchoredTranslate( val offset = anchorToOffset - anchorFromOffset return if (content == transition.toContent) { - Offset(value.x - offset.x, value.y - offset.y) + Offset(idleValue.x - offset.x, idleValue.y - offset.y) } else { - Offset(value.x + offset.x, value.y + offset.y) + Offset(idleValue.x + offset.x, idleValue.y + offset.y) } } } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/DrawScale.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/DrawScale.kt index 47692d07e8dc..8488ae5178b0 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/DrawScale.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/DrawScale.kt @@ -37,7 +37,7 @@ internal class DrawScale( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: Scale, + idleValue: Scale, ): Scale { return Scale(scaleX, scaleY, pivot) } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt index 4ae07c541011..884aae4b8b1a 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt @@ -33,37 +33,37 @@ internal class EdgeTranslate( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: Offset, + idleValue: Offset, ): Offset { val sceneSize = content.targetSize() ?: error("Content ${content.debugName} does not have a target size") - val elementSize = element.targetSize(content) ?: return value + val elementSize = element.targetSize(content) ?: return idleValue return when (edge.resolve(layoutDirection)) { Edge.Resolved.Top -> if (startsOutsideLayoutBounds) { - Offset(value.x, -elementSize.height.toFloat()) + Offset(idleValue.x, -elementSize.height.toFloat()) } else { - Offset(value.x, 0f) + Offset(idleValue.x, 0f) } Edge.Resolved.Left -> if (startsOutsideLayoutBounds) { - Offset(-elementSize.width.toFloat(), value.y) + Offset(-elementSize.width.toFloat(), idleValue.y) } else { - Offset(0f, value.y) + Offset(0f, idleValue.y) } Edge.Resolved.Bottom -> if (startsOutsideLayoutBounds) { - Offset(value.x, sceneSize.height.toFloat()) + Offset(idleValue.x, sceneSize.height.toFloat()) } else { - Offset(value.x, (sceneSize.height - elementSize.height).toFloat()) + Offset(idleValue.x, (sceneSize.height - elementSize.height).toFloat()) } Edge.Resolved.Right -> if (startsOutsideLayoutBounds) { - Offset(sceneSize.width.toFloat(), value.y) + Offset(sceneSize.width.toFloat(), idleValue.y) } else { - Offset((sceneSize.width - elementSize.width).toFloat(), value.y) + Offset((sceneSize.width - elementSize.width).toFloat(), idleValue.y) } } } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Fade.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Fade.kt index c11ec977fe2b..ef769e7d0c19 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Fade.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Fade.kt @@ -27,7 +27,7 @@ internal class Fade(override val matcher: ElementMatcher) : PropertyTransformati content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: Float, + idleValue: Float, ): Float { // Return the alpha value of [element] either when it starts fading in or when it finished // fading out, which is `0` in both cases. diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/ScaleSize.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/ScaleSize.kt index a159a5b5b2bd..ef3654b65b0a 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/ScaleSize.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/ScaleSize.kt @@ -36,11 +36,11 @@ internal class ScaleSize( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: IntSize, + idleValue: IntSize, ): IntSize { return IntSize( - width = (value.width * width).roundToInt(), - height = (value.height * height).roundToInt(), + width = (idleValue.width * width).roundToInt(), + height = (idleValue.height * height).roundToInt(), ) } } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt index 2ca7d36c22d0..74a3ead3fbd7 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt @@ -58,14 +58,14 @@ interface PropertyTransformation<T> : Transformation { * - the value at progress = 100% for elements that are leaving the layout (i.e. elements in the * content we are transitioning from). * - * The returned value will be interpolated using the [transition] progress and [value], the + * The returned value will be interpolated using the [transition] progress and [idleValue], the * value of the property when we are idle. */ fun PropertyTransformationScope.transform( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: T, + idleValue: T, ): T } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Translate.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Translate.kt index af0a6edfa2fb..356ed9969458 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Translate.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Translate.kt @@ -35,9 +35,9 @@ internal class Translate( content: ContentKey, element: ElementKey, transition: TransitionState.Transition, - value: Offset, + idleValue: Offset, ): Offset { - return Offset(value.x + x.toPx(), value.y + y.toPx()) + return Offset(idleValue.x + x.toPx(), idleValue.y + y.toPx()) } } |