fix(month): keep the selection outline off the morphing cell (#53)

Drawn on the cell's morphing pill, the outline rode its shared bounds — so
collapsing painted it at the *expanded* cell's size and shrank it down, a
full-height outline flashing over a grid that no longer had full-height
cells. The same shape of mistake as the marker that used to cross the
outgoing month during a page turn.

It gets its own untagged layer, laid out where the collapsed cell actually
is, and fades in there. That is the only size it is ever true at.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-20 19:57:29 +02:00
parent 01a6c8bab8
commit 63ba69729e

View File

@@ -1320,7 +1320,17 @@ private fun SplitDayCell(
.fillMaxSize()
.morphElement(MonthMorphKey.Cell(date))
.clip(CELL_SHAPE)
.background(background)
.background(background),
)
// The outline is a layer of its own, deliberately *untagged*. Drawn on the
// morphing pill it rode the cell's shared bounds, so collapsing painted it
// at the expanded cell's size and shrank it down — a full-height outline
// flashing over a grid that no longer had full-height cells. Untagged it
// is laid out where the collapsed cell actually is and simply fades in,
// which is the only size it is ever true at.
Box(
Modifier
.fillMaxSize()
.border(
width = 1.5.dp,
color = MaterialTheme.colorScheme.primary.copy(alpha = selection),