TextAlign start for lyrics & center for lyrics who need spaces (isExcess)
This commit is contained in:
parent
7ea9d08cb3
commit
2ea68325be
1 changed files with 3 additions and 3 deletions
|
|
@ -734,13 +734,13 @@ fun LazyVerticalGridTUO(
|
||||||
val isTooLong = textWidthDp > containerWidthDp
|
val isTooLong = textWidthDp > containerWidthDp
|
||||||
|
|
||||||
val spacer = makeSpaceBetweenSyllables(textMeasurer, gridWidthDp / gridColumnCount)
|
val spacer = makeSpaceBetweenSyllables(textMeasurer, gridWidthDp / gridColumnCount)
|
||||||
val (dynamicSpaceSyl, alignText) = spacer(syl, allTemps, syls_i, index)
|
val (dynamicSpaceSyl, alignmentText) = spacer(syl, allTemps, syls_i, index)
|
||||||
Text(
|
Text(
|
||||||
text = dynamicSpaceSyl,
|
text = dynamicSpaceSyl,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(end = 4.dp)/*.border(1.dp, Color.Yellow, RectangleShape)*/
|
.padding(end = 4.dp)/*.border(1.dp, Color.Yellow, RectangleShape)*/
|
||||||
.wrapContentSize(unbounded = true, align = alignText),
|
.wrapContentSize(unbounded = true, align = alignmentText),
|
||||||
softWrap = false,
|
softWrap = false,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Visible,
|
overflow = TextOverflow.Visible,
|
||||||
|
|
@ -773,7 +773,7 @@ fun makeSpaceBetweenSyllables(
|
||||||
textMeasurer: TextMeasurer,
|
textMeasurer: TextMeasurer,
|
||||||
noteWidthDp: Dp,
|
noteWidthDp: Dp,
|
||||||
fontSize: TextUnit = 16.sp
|
fontSize: TextUnit = 16.sp
|
||||||
): (String, List<List<String>>, Int, Int) -> Pair<String, Alignment> {
|
): (String, List<List<String>>, Int, Int) -> Pair<String, Alignment> {
|
||||||
val density = LocalDensity.current
|
val density = LocalDensity.current
|
||||||
val noteWidthPx = with(density) { noteWidthDp.toPx() }
|
val noteWidthPx = with(density) { noteWidthDp.toPx() }
|
||||||
val style = TextStyle(fontSize = fontSize)
|
val style = TextStyle(fontSize = fontSize)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue