Skip to content

Commit

Permalink
move fillMaxSize to Box
Browse files Browse the repository at this point in the history
  • Loading branch information
mnalis committed Nov 30, 2024
1 parent 5344e89 commit 1b80b22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ fun MainScreen(
}
}

Box(modifier) {
Box(modifier = Modifier
.fillMaxSize()
.windowInsetsPadding(WindowInsets.systemBars)
) {
if (isCreateNodeEnabled) {
Crosshair()
}
Expand All @@ -218,8 +221,6 @@ fun MainScreen(
}

Column(Modifier
.fillMaxSize()
.windowInsetsPadding(WindowInsets.systemBars)
.onGloballyPositioned { pointerPinRects["frame"] = it.boundsInRoot() }
) {
Box(Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ import de.westnordost.streetcomplete.ui.theme.AppTheme


fun ComposeView.content(content: @Composable () -> Unit) {
consumeWindowInsets = true

setContent { AppTheme { content() } }
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.fragment.app.Fragment

fun Fragment.composableContent(content: @Composable () -> Unit): View =
ComposeView(requireContext()).apply {
consumeWindowInsets = true
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnLifecycleDestroyed(lifecycle))
content { content() }
}

0 comments on commit 1b80b22

Please sign in to comment.