Skip to content

Commit

Permalink
fix: 트랜지션 수치 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirFir committed Dec 16, 2024
1 parent eaa2d03 commit 1a5512f
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import androidx.compose.ui.graphics.Color

private const val TRANSITION_DURATION = 400
private const val FADE_RATIO = .55f
private const val SLIDE_RATIO = .85f
private const val SCALE_RATIO = .9f
private const val SLIDE_DIVIDE_RATIO = 3

internal val defaultOutsideColor = Color(0xFF282828)

Expand All @@ -25,23 +26,23 @@ internal fun<S> AnimatedContentTransitionScope<S>.defaultExitTransition() = fade
targetAlpha = FADE_RATIO
) + scaleOut(
animationSpec = tween(TRANSITION_DURATION),
targetScale = SLIDE_RATIO
targetScale = SCALE_RATIO
) + slideOutOfContainer(
towards = AnimatedContentTransitionScope.SlideDirection.Left,
animationSpec = tween(TRANSITION_DURATION),
targetOffset = { it / 4 }
targetOffset = { it / SLIDE_DIVIDE_RATIO }
)

internal fun<S> AnimatedContentTransitionScope<S>.defaultPopEnterTransition() = fadeIn(
animationSpec = tween(TRANSITION_DURATION),
initialAlpha = FADE_RATIO
) + scaleIn(
animationSpec = tween(TRANSITION_DURATION),
initialScale = SLIDE_RATIO
initialScale = SCALE_RATIO
) + slideIntoContainer(
towards = AnimatedContentTransitionScope.SlideDirection.Right,
animationSpec = tween(TRANSITION_DURATION),
initialOffset = { it / 4 }
initialOffset = { it / SLIDE_DIVIDE_RATIO }
)

internal fun<S> AnimatedContentTransitionScope<S>.defaultPopExitTransition() = slideOutOfContainer(
Expand Down

0 comments on commit 1a5512f

Please sign in to comment.