Timeline: improve "jump to bottom" button
This commit is contained in:
parent
e7a92e9a4b
commit
52ec53575a
1 changed files with 4 additions and 10 deletions
|
|
@ -21,6 +21,7 @@ package io.element.android.features.messages.impl.timeline
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.animation.ExperimentalAnimationApi
|
import androidx.compose.animation.ExperimentalAnimationApi
|
||||||
import androidx.compose.animation.animateContentSize
|
import androidx.compose.animation.animateContentSize
|
||||||
|
import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.animation.scaleIn
|
import androidx.compose.animation.scaleIn
|
||||||
import androidx.compose.animation.scaleOut
|
import androidx.compose.animation.scaleOut
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
|
|
@ -278,8 +279,8 @@ internal fun BoxScope.TimelineScrollHelper(
|
||||||
.align(Alignment.BottomEnd)
|
.align(Alignment.BottomEnd)
|
||||||
.padding(end = 24.dp, bottom = 12.dp),
|
.padding(end = 24.dp, bottom = 12.dp),
|
||||||
visible = showScrollToBottomButton || LocalInspectionMode.current,
|
visible = showScrollToBottomButton || LocalInspectionMode.current,
|
||||||
enter = scaleIn(),
|
enter = scaleIn(animationSpec = tween(100)),
|
||||||
exit = scaleOut(),
|
exit = scaleOut(animationSpec = tween(100)),
|
||||||
) {
|
) {
|
||||||
FloatingActionButton(
|
FloatingActionButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|
@ -293,14 +294,7 @@ internal fun BoxScope.TimelineScrollHelper(
|
||||||
},
|
},
|
||||||
elevation = FloatingActionButtonDefaults.elevation(4.dp, 4.dp, 4.dp, 4.dp),
|
elevation = FloatingActionButtonDefaults.elevation(4.dp, 4.dp, 4.dp, 4.dp),
|
||||||
shape = CircleShape,
|
shape = CircleShape,
|
||||||
modifier = Modifier
|
modifier = Modifier.size(36.dp),
|
||||||
.shadow(
|
|
||||||
elevation = 4.dp,
|
|
||||||
shape = CircleShape,
|
|
||||||
ambientColor = ElementTheme.materialColors.primary,
|
|
||||||
spotColor = ElementTheme.materialColors.primary,
|
|
||||||
)
|
|
||||||
.size(36.dp),
|
|
||||||
containerColor = ElementTheme.colors.bgSubtleSecondary,
|
containerColor = ElementTheme.colors.bgSubtleSecondary,
|
||||||
contentColor = ElementTheme.colors.iconSecondary
|
contentColor = ElementTheme.colors.iconSecondary
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue