Skip to content

Fix padding TODO #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawing
import androidx.compose.foundation.lazy.grid.GridCells
Expand Down Expand Up @@ -56,16 +54,8 @@ private fun ObjectGrid(
) {
LazyVerticalGrid(
columns = GridCells.Adaptive(180.dp),
// TODO simplify padding after https://issuetracker.google.com/issues/365052672 is fixed
modifier = modifier
.fillMaxSize()
.padding(
WindowInsets.safeDrawing
.only(WindowInsetsSides.Horizontal)
.asPaddingValues()
),
contentPadding = WindowInsets.safeDrawing.only(WindowInsetsSides.Vertical)
.asPaddingValues(),
modifier = modifier.fillMaxSize(),
contentPadding = WindowInsets.safeDrawing.asPaddingValues(),
) {
items(objects, key = { it.objectID }) { obj ->
ObjectFrame(
Expand Down