Skip to content

Commit

Permalink
Animated player background in pure black mode (close #1359)
Browse files Browse the repository at this point in the history
  • Loading branch information
z-huang committed Aug 16, 2024
1 parent 76fffd9 commit 8e2edd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/com/zionhuang/music/ui/player/Player.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.lerp
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.res.painterResource
Expand Down Expand Up @@ -98,7 +99,7 @@ fun BottomSheetPlayer(
useDarkTheme && pureBlack
}
val backgroundColor = if (useBlackBackground && state.value > state.collapsedBound) {
Color.Black
lerp(MaterialTheme.colorScheme.surfaceContainer, Color.Black, state.progress)
} else {
MaterialTheme.colorScheme.surfaceContainer
}
Expand Down

0 comments on commit 8e2edd9

Please sign in to comment.