UPD: Make Grid for NoteBrowser responsive

This commit is contained in:
sebastian 2025-05-10 13:54:44 +02:00
parent 234a5a7a60
commit caece7bfea

View File

@ -170,7 +170,7 @@ fun NoteGrid(
val columns = 2 // Anzahl Spalten, ggf. responsiv machen
LazyVerticalGrid(
modifier = modifier.fillMaxSize(),
columns = GridCells.Fixed(columns),
columns = GridCells.Adaptive(minSize = 240.dp),
contentPadding = PaddingValues(8.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
horizontalArrangement = Arrangement.spacedBy(12.dp)
@ -178,6 +178,8 @@ fun NoteGrid(
items(collections) { collection ->
Column(
modifier = Modifier
.height(120.dp)
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.background(MaterialTheme.colorScheme.surfaceVariant)
.clickable { onCollectionClick(collection) }
@ -204,6 +206,7 @@ fun NoteGrid(
items(notes) { note ->
Column(
modifier = Modifier
.height(120.dp)
.clip(RoundedCornerShape(12.dp))
.background(MaterialTheme.colorScheme.surfaceVariant)
.clickable { onNoteClick(note) }