Fix: Fixed column width instead weight 1f
This commit is contained in:
parent
7f10e94488
commit
d639851d19
1 changed files with 5 additions and 6 deletions
|
|
@ -721,7 +721,7 @@ fun LazyVerticalGridTUO(
|
||||||
|
|
||||||
val myTimestamp = sharedScreenModel.tuoTimestamps.value.getOrElse(globalIndex) { 0L }
|
val myTimestamp = sharedScreenModel.tuoTimestamps.value.getOrElse(globalIndex) { 0L }
|
||||||
|
|
||||||
Box(modifier = Modifier.weight(1f)
|
Box(modifier = Modifier.width(gridWidthDp / gridColumnCount)
|
||||||
.combinedClickable(
|
.combinedClickable(
|
||||||
onClick = {
|
onClick = {
|
||||||
// println("je suis sur grille no: $globalIndex")
|
// println("je suis sur grille no: $globalIndex")
|
||||||
|
|
@ -754,14 +754,13 @@ fun LazyVerticalGridTUO(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.Start
|
horizontalArrangement = Arrangement.Start
|
||||||
) {
|
) {
|
||||||
|
val columnWidthDp = gridWidthDp / gridColumnCount
|
||||||
allTemps.forEachIndexed { syls_i, syllables ->
|
allTemps.forEachIndexed { syls_i, syllables ->
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.width(columnWidthDp)
|
||||||
.widthIn(min = gridWidthDp / gridColumnCount)
|
|
||||||
) {
|
) {
|
||||||
val noteWidth = gridWidthDp / gridColumnCount
|
val noteWidth = columnWidthDp
|
||||||
val density = LocalDensity.current
|
val density = LocalDensity.current
|
||||||
syllables.joinToString { " " }
|
syllables.joinToString { " " }
|
||||||
syllables.mapIndexed { index, syl ->
|
syllables.mapIndexed { index, syl ->
|
||||||
|
|
@ -777,7 +776,7 @@ fun LazyVerticalGridTUO(
|
||||||
val containerWidthDp = gridWidthDp / gridColumnCount
|
val containerWidthDp = gridWidthDp / gridColumnCount
|
||||||
val isTooLong = textWidthDp > containerWidthDp
|
val isTooLong = textWidthDp > containerWidthDp
|
||||||
|
|
||||||
val spacer = makeSpaceBetweenSyllables(textMeasurer, gridWidthDp / gridColumnCount)
|
val spacer = makeSpaceBetweenSyllables(textMeasurer, columnWidthDp)
|
||||||
val (dynamicSpaceSyl, alignmentText) = spacer(syl, allTemps, syls_i, index)
|
val (dynamicSpaceSyl, alignmentText) = spacer(syl, allTemps, syls_i, index)
|
||||||
Text(
|
Text(
|
||||||
text = dynamicSpaceSyl,
|
text = dynamicSpaceSyl,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue