@@ -3,7 +3,6 @@ package top.yukonga.miuix.kmp.basic
33import androidx.compose.animation.core.AnimationSpec
44import androidx.compose.animation.core.AnimationState
55import androidx.compose.animation.core.DecayAnimationSpec
6- import androidx.compose.animation.core.Spring
76import androidx.compose.animation.core.animateDecay
87import androidx.compose.animation.core.animateFloatAsState
98import androidx.compose.animation.core.animateTo
@@ -87,7 +86,7 @@ fun TopAppBar(
8786 actions : @Composable RowScope .() -> Unit = {},
8887 scrollBehavior : ScrollBehavior ? = null,
8988 defaultWindowInsetsPadding : Boolean = true,
90- horizontalPadding : Dp = 28 .dp
89+ horizontalPadding : Dp = 26 .dp
9190) {
9291 val density = LocalDensity .current
9392 val expandedHeightPx by rememberUpdatedState(
@@ -148,7 +147,7 @@ fun SmallTopAppBar(
148147 actions : @Composable RowScope .() -> Unit = {},
149148 scrollBehavior : ScrollBehavior ? = null,
150149 defaultWindowInsetsPadding : Boolean = true,
151- horizontalPadding : Dp = 28 .dp
150+ horizontalPadding : Dp = 26 .dp
152151) {
153152 SideEffect {
154153 // Sets the height offset limit of the SmallTopAppBar to 0f
@@ -213,7 +212,7 @@ fun SmallTopAppBar(
213212fun MiuixScrollBehavior (
214213 state : TopAppBarState = rememberTopAppBarState(),
215214 canScroll : () -> Boolean = { true },
216- snapAnimationSpec : AnimationSpec <Float >? = spring(stiffness = Spring . StiffnessMedium ),
215+ snapAnimationSpec : AnimationSpec <Float >? = spring(stiffness = 3000f ),
217216 flingAnimationSpec : DecayAnimationSpec <Float >? = rememberSplineBasedDecay()
218217): ScrollBehavior =
219218 remember(state, canScroll, snapAnimationSpec, flingAnimationSpec) {
0 commit comments