Skip to content

Commit 8bc151a

Browse files
committed
Adding window insets to PermanentDrawerSheet
1 parent 1187516 commit 8bc151a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

app/src/main/java/com/example/reply/ui/ReplyHomeScreen.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ import androidx.compose.foundation.layout.Arrangement
2121
import androidx.compose.foundation.layout.Box
2222
import androidx.compose.foundation.layout.Column
2323
import androidx.compose.foundation.layout.Row
24+
import androidx.compose.foundation.layout.WindowInsets
25+
import androidx.compose.foundation.layout.WindowInsetsSides
2426
import androidx.compose.foundation.layout.fillMaxHeight
2527
import androidx.compose.foundation.layout.fillMaxSize
2628
import androidx.compose.foundation.layout.fillMaxWidth
29+
import androidx.compose.foundation.layout.only
2730
import androidx.compose.foundation.layout.padding
31+
import androidx.compose.foundation.layout.safeDrawing
2832
import androidx.compose.foundation.layout.size
2933
import androidx.compose.foundation.layout.statusBarsPadding
3034
import androidx.compose.foundation.layout.width
@@ -96,7 +100,14 @@ fun ReplyHomeScreen(
96100
val navigationDrawerContentDescription = stringResource(R.string.navigation_drawer)
97101
PermanentNavigationDrawer(
98102
drawerContent = {
99-
PermanentDrawerSheet(Modifier.width(dimensionResource(R.dimen.drawer_width))) {
103+
PermanentDrawerSheet(
104+
modifier = Modifier
105+
.width(dimensionResource(R.dimen.drawer_width))
106+
.background(MaterialTheme.colorScheme.inverseOnSurface),
107+
windowInsets = WindowInsets.safeDrawing.only(
108+
WindowInsetsSides.Top + WindowInsetsSides.Start
109+
),
110+
) {
100111
NavigationDrawerContent(
101112
selectedDestination = replyUiState.currentMailbox,
102113
onTabPressed = onTabPressed,

0 commit comments

Comments
 (0)