Skip to content

Commit

Permalink
feat: Added some elevation to the draggable player
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fontán <[email protected]>
  • Loading branch information
BobbyESP committed Apr 27, 2024
1 parent dcf429d commit 6f6a49e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Square
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalDrawerSheet
Expand Down Expand Up @@ -127,6 +129,9 @@ fun Navigator() {
return@NavigationDrawerItem
} else {
navController.navigate(route.route) {
popUpTo(Route.MainHost.route) {
saveState = true
}
launchSingleTop = true
restoreState = true
}
Expand All @@ -135,7 +140,8 @@ fun Navigator() {
}
}
}, icon = {
Icon(imageVector = route.icon!!,
Icon(
imageVector = route.icon ?: Icons.Rounded.Square,
contentDescription = route.title?.let { stringResource(id = it) })
}, badge = {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fun MediaplayerSheet(
viewModel = viewModel,
)
},
backgroundColor = MaterialTheme.colorScheme.surfaceColorAtElevation(NavigationBarDefaults.Elevation)
backgroundColor = MaterialTheme.colorScheme.surfaceColorAtElevation(NavigationBarDefaults.Elevation + 2.dp)
) {
MediaplayerExpandedContent(
viewModel = viewModel,
Expand Down

0 comments on commit 6f6a49e

Please sign in to comment.