Updated on 2026-08-14
This commit is contained in:
parent
8d0f11d10b
commit
d3ab3d6f11
1 changed files with 5 additions and 1 deletions
|
|
@ -100,6 +100,10 @@ object RoutingTransitionAnimationFactory {
|
|||
* Like `decompose.fade(...)` but only applies the alpha `graphicsLayer` when `direction`
|
||||
* is in [directions]. `null` directions = always fade (matches stock `fade()` behavior).
|
||||
* `emptySet()` directions = never fade (modifier passes through untouched).
|
||||
*
|
||||
* Uses [CompositingStrategy.ModulateAlpha] (not `Offscreen` and not the default `Auto`)
|
||||
* because screens that own a `hazeEffect` (e.g. `WalletTopBar`'s progressive blur) render
|
||||
* through a `RenderEffect`, which always allocates its own offscreen buffer.
|
||||
*/
|
||||
private fun directionalFade(
|
||||
animationSpec: FiniteAnimationSpec<Float>,
|
||||
|
|
@ -109,7 +113,7 @@ object RoutingTransitionAnimationFactory {
|
|||
if (directions == null || directions.contains(direction)) {
|
||||
Modifier.graphicsLayer {
|
||||
alpha = 1f - abs(factor)
|
||||
compositingStrategy = CompositingStrategy.Offscreen
|
||||
compositingStrategy = CompositingStrategy.ModulateAlpha
|
||||
}
|
||||
} else {
|
||||
Modifier
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue