Compact density for task rows and home list rows
This commit is contained in:
1 parent
c65a252d1b
commit
c4a313fe69
2 files changed
+8
-8
No files matched your search
@@ -92,6 +92,7 @@ import de.jeanlucmakiola.agendula.domain.TaskFilter
|
||||
import de.jeanlucmakiola.agendula.ui.common.ActionShapes
|
||||
import de.jeanlucmakiola.floret.components.ActionButton
|
||||
import de.jeanlucmakiola.floret.components.GroupedRow
|
||||
import de.jeanlucmakiola.floret.components.GroupedRowMinHeight
|
||||
import de.jeanlucmakiola.floret.components.Position
|
||||
import de.jeanlucmakiola.floret.components.SnackChip
|
||||
import de.jeanlucmakiola.floret.components.SnackChipHeight
|
||||
@@ -347,12 +348,11 @@ private fun ListsContent(
|
||||
items = group.lists,
|
||||
keyOf = { it.list.id },
|
||||
onReorder = { ordered -> onReorder(ordered.map { it.list.id }) },
|
||||
rowHeight = 72.dp,
|
||||
rowHeight = GroupedRowMinHeight,
|
||||
) { overview, position, dragHandle, isDragging ->
|
||||
GroupedRow(
|
||||
title = overview.list.name,
|
||||
position = position,
|
||||
minHeight = 72.dp,
|
||||
gapBelow = false,
|
||||
container = if (isDragging) MaterialTheme.colorScheme.secondaryContainer else null,
|
||||
leading = { ListColorChip(overview.list.color) },
|
||||
@@ -374,7 +374,6 @@ private fun ListsContent(
|
||||
GroupedRow(
|
||||
title = overview.list.name,
|
||||
position = positionOf(index, group.lists.size),
|
||||
minHeight = 72.dp,
|
||||
leading = { ListColorChip(overview.list.color) },
|
||||
trailing = {
|
||||
if (overview.openCount > 0) {
|
||||
|
||||
@@ -138,6 +138,7 @@ import de.jeanlucmakiola.floret.components.SnackChipMargin
|
||||
import de.jeanlucmakiola.floret.time.formatDateTimeCompact
|
||||
import de.jeanlucmakiola.floret.components.pastelize
|
||||
import de.jeanlucmakiola.floret.components.positionOf
|
||||
import de.jeanlucmakiola.floret.identity.byDensity
|
||||
import java.time.LocalDate
|
||||
import java.time.ZoneId
|
||||
|
||||
@@ -833,8 +834,8 @@ internal fun TaskRowContent(
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = 64.dp)
|
||||
.padding(start = 12.dp, end = 16.dp, top = 8.dp, bottom = 8.dp),
|
||||
.heightIn(min = byDensity(64.dp, 56.dp))
|
||||
.padding(start = 12.dp, end = 16.dp, top = byDensity(8.dp, 4.dp), bottom = byDensity(8.dp, 4.dp)),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
// Calendula's signature accent: a slim pastelised colour bar for the
|
||||
@@ -1039,7 +1040,7 @@ private fun AddSubtaskRow(
|
||||
modifier = modifier.fillMaxWidth().padding(horizontal = 16.dp).then(gap).revealOnFocus(),
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().heightIn(min = 52.dp).padding(start = 12.dp, end = 8.dp),
|
||||
modifier = Modifier.fillMaxWidth().heightIn(min = byDensity(52.dp, 48.dp)).padding(start = 12.dp, end = 8.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Spacer(Modifier.width(5.dp)) // the parents' colour-bar slot, kept for alignment
|
||||
@@ -1183,8 +1184,8 @@ private fun SubtaskRow(
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = 56.dp)
|
||||
.padding(start = 12.dp, end = 16.dp, top = 6.dp, bottom = 6.dp),
|
||||
.heightIn(min = byDensity(56.dp, 48.dp))
|
||||
.padding(start = 12.dp, end = 16.dp, top = byDensity(6.dp, 0.dp), bottom = byDensity(6.dp, 0.dp)),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
// No colour bar — that absence (with the grouped nesting) marks the row
|
||||
|
||||
Reference in new issue
Block a user