From c2fbfb0bef150169f5de5166043c8a4440028323 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 4 Sep 2026 17:27:09 +0200 Subject: [PATCH] Trim the drag copy's layout note (#267) --- .../jeanlucmakiola/calendula/ui/common/TimelineDrag.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/TimelineDrag.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/TimelineDrag.kt index 22b2baa..f6a4193 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/TimelineDrag.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/common/TimelineDrag.kt @@ -724,12 +724,9 @@ private fun DragCopy( val timeLineHeight = with(density) { MaterialTheme.typography.labelSmall.lineHeight.toDp() } - // The copy is the block's size and spends its height the same way, so text - // wraps here exactly where it wrapped there rather than reflowing under the - // finger and snapping back on drop (#267). The range is paid for first — - // where the drop lands is what the drag is for, and the block may have been - // too short to show it — and the title takes what of its lines still fit, - // since nothing clips a copy that outgrows its block. + // The block's size, spent the block's way, so nothing reflows under the + // finger (#267) — but the range is paid for first, since it may be showing + // where a block too short for it will land, and nothing clips the overrun. val available = height - BLOCK_TEXT_INSET * 2 val reserved = if (label == null) 0.dp else timeLineHeight val titleBudget = ((available - reserved) / titleLineHeight).toInt().coerceAtLeast(0)