feat: spring instead of tween for mockup
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
a1ba1ca48c
commit
e2dc704685
|
|
@ -1,8 +1,7 @@
|
||||||
package chat.revolt.screens.labs.ui.mockups
|
package chat.revolt.screens.labs.ui.mockups
|
||||||
|
|
||||||
import androidx.compose.animation.animateColorAsState
|
import androidx.compose.animation.animateColorAsState
|
||||||
import androidx.compose.animation.core.EaseInOutExpo
|
import androidx.compose.animation.core.spring
|
||||||
import androidx.compose.animation.core.tween
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||||
import androidx.compose.foundation.interaction.collectIsPressedAsState
|
import androidx.compose.foundation.interaction.collectIsPressedAsState
|
||||||
|
|
@ -64,7 +63,7 @@ fun CallScreenMockup() {
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colorScheme.secondaryContainer
|
MaterialTheme.colorScheme.secondaryContainer
|
||||||
},
|
},
|
||||||
animationSpec = tween(200, easing = EaseInOutExpo),
|
animationSpec = spring(),
|
||||||
label = "pttBackground"
|
label = "pttBackground"
|
||||||
)
|
)
|
||||||
val pttText by animateColorAsState(
|
val pttText by animateColorAsState(
|
||||||
|
|
@ -73,7 +72,7 @@ fun CallScreenMockup() {
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colorScheme.onSecondaryContainer
|
MaterialTheme.colorScheme.onSecondaryContainer
|
||||||
},
|
},
|
||||||
animationSpec = tween(200, easing = EaseInOutExpo),
|
animationSpec = spring(),
|
||||||
label = "pttText"
|
label = "pttText"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue