Skip to content

Commit

Permalink
Merge pull request #1027 from nyagasan/nyagasan/fix/foldable-navrail
Browse files Browse the repository at this point in the history
Change NavRail position to center on large screen
  • Loading branch information
takahirom authored Sep 11, 2024
2 parents bbaf201 + 39f0595 commit 39ac19d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -224,7 +225,10 @@ fun MainScreen(

val scaffoldPadding = remember { mutableStateOf(PaddingValues(0.dp)) }

Row(modifier = modifier.fillMaxSize()) {
Row(
modifier = modifier.fillMaxSize(),
verticalAlignment = Alignment.CenterVertically,
) {
AnimatedVisibility(visible = navigationType == NavigationRail) {
GlassLikeNavRail(
hazeState = hazeState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ fun GlassLikeNavRail(
modifier: Modifier = Modifier,
) {
Box(
modifier = modifier.size(width = 64.dp, height = 320.dp)
modifier = modifier
.size(width = 64.dp, height = 420.dp)
.run {
if (isBlurSupported()) {
hazeChild(state = hazeState, shape = CircleShape).border(
Expand Down

0 comments on commit 39ac19d

Please sign in to comment.