mirror of
https://github.com/bitwarden/android.git
synced 2025-03-15 18:58:59 +03:00
Ensure toScrolledContainerColor uses the correct easing function (#450)
This commit is contained in:
parent
3f0e44d42f
commit
6665f20af9
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.x8bit.bitwarden.ui.platform.base.util
|
||||
|
||||
import androidx.compose.animation.core.FastOutLinearInEasing
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.TopAppBarScrollBehavior
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
@ -22,6 +23,8 @@ fun TopAppBarScrollBehavior.toScrolledContainerColor(
|
|||
return lerp(
|
||||
start = expandedColor,
|
||||
stop = collapsedColor,
|
||||
fraction = progressFraction,
|
||||
// The easing function here matches what is currently in TopAppBarColors.containerColor and
|
||||
// is necessary to match to the app bar color through the full range of motion.
|
||||
fraction = FastOutLinearInEasing.transform(progressFraction),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue