From d639851d19b52ad412f56bf26fee49d4d9c41671 Mon Sep 17 00:00:00 2001 From: "hasinarak3@gmail.com" Date: Thu, 19 Mar 2026 10:24:45 +0300 Subject: [PATCH] Fix: Fixed column width instead weight 1f --- .../kotlin/mg/dot/feufaro/solfa/TimeUnitObject.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/TimeUnitObject.kt b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/TimeUnitObject.kt index 7fe11a6..15c727b 100644 --- a/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/TimeUnitObject.kt +++ b/composeApp/src/commonMain/kotlin/mg/dot/feufaro/solfa/TimeUnitObject.kt @@ -721,7 +721,7 @@ fun LazyVerticalGridTUO( val myTimestamp = sharedScreenModel.tuoTimestamps.value.getOrElse(globalIndex) { 0L } - Box(modifier = Modifier.weight(1f) + Box(modifier = Modifier.width(gridWidthDp / gridColumnCount) .combinedClickable( onClick = { // println("je suis sur grille no: $globalIndex") @@ -754,14 +754,13 @@ fun LazyVerticalGridTUO( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Start ) { - + val columnWidthDp = gridWidthDp / gridColumnCount allTemps.forEachIndexed { syls_i, syllables -> Column( modifier = Modifier - .weight(1f) - .widthIn(min = gridWidthDp / gridColumnCount) + .width(columnWidthDp) ) { - val noteWidth = gridWidthDp / gridColumnCount + val noteWidth = columnWidthDp val density = LocalDensity.current syllables.joinToString { " " } syllables.mapIndexed { index, syl -> @@ -777,7 +776,7 @@ fun LazyVerticalGridTUO( val containerWidthDp = gridWidthDp / gridColumnCount val isTooLong = textWidthDp > containerWidthDp - val spacer = makeSpaceBetweenSyllables(textMeasurer, gridWidthDp / gridColumnCount) + val spacer = makeSpaceBetweenSyllables(textMeasurer, columnWidthDp) val (dynamicSpaceSyl, alignmentText) = spacer(syl, allTemps, syls_i, index) Text( text = dynamicSpaceSyl,