Skip to content

Commit

Permalink
fix: prevent ModalBottomSheet NewItemSelector expanding to full scree…
Browse files Browse the repository at this point in the history
…n size (#135)

Fix ModalBottomSheet NewItemSelector expanding to full screen size.
Also change containercolor of ScrollableTabRow.
  • Loading branch information
mipro98 authored Nov 24, 2024
1 parent 7fb9506 commit 8fe2116
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -731,15 +731,15 @@ private fun NewItemSelectorBottomSheet(
) {
val scope = rememberCoroutineScope()
ModalBottomSheet(
modifier = Modifier
.fillMaxHeight(0.6f), // avoid jumping height when changing folders
contentWindowInsets = { WindowInsets(top = 0.dp) }, // makes sure the scrim covers the status bar
onDismissRequest = remember { onDismissed },
sheetState = sheetState,
shape = RectangleShape,
dragHandle = {},
) {
NewItemSelector(
modifier = Modifier
.fillMaxHeight(0.6f), // avoid jumping height when changing folders
uiState = uiState,
onItemSelected = onItemSelected,
onNewItem = onNewItem,
Expand Down Expand Up @@ -1367,6 +1367,7 @@ private fun LibraryFoldersRow(
ScrollableTabRow(
modifier = modifier.fillMaxWidth(),
selectedTabIndex = selectedTabIndex,
containerColor = MaterialTheme.colorScheme.surfaceContainerLow, // match color of ModalBottomSheet
divider = { }
) {
LibraryFolderElement(
Expand Down

0 comments on commit 8fe2116

Please sign in to comment.