Fix underline color
This commit is contained in:
parent
2791a48452
commit
224062e90d
1 changed files with 6 additions and 13 deletions
|
|
@ -287,7 +287,7 @@ fun TimeUnitComposable(
|
|||
) {
|
||||
val col = if (tuo.getNum() % 2 == 0) MaterialTheme.colorScheme.tertiary.copy(alpha = 0.05f) else MaterialTheme.colorScheme.error.copy(alpha = 0.05f)
|
||||
val currentDensity = LocalDensity.current
|
||||
|
||||
val colorUnderline = MaterialTheme.colorScheme.onSecondary
|
||||
val animatedColor = if (gridActive) {
|
||||
animateColorAsState(
|
||||
targetValue = MaterialTheme.colorScheme.secondary.copy(alpha = 1f),
|
||||
|
|
@ -450,20 +450,12 @@ fun TimeUnitComposable(
|
|||
xEnd = textLayoutResult?.getCursorRect(globalEndIndex)?.right ?: size.width
|
||||
}
|
||||
//if (it.underlineSpec.size > 0) {
|
||||
var colorUnderline = when (tuo.mutableNoteVersion) {
|
||||
0 -> Color.DarkGray
|
||||
1 -> Color.Yellow
|
||||
2 -> Color.Magenta
|
||||
3 -> Color.Blue
|
||||
4 -> Color.Green
|
||||
else -> Color.Black
|
||||
}
|
||||
val totalHeight = textLayoutResult?.size?.height ?: 0
|
||||
// # FIX
|
||||
val nbNotes = multiLineText.count { it == '\n' } +1
|
||||
val yPos = ta.voiceNumber * totalHeight.toFloat() / nbNotes
|
||||
drawLine(
|
||||
colorUnderline,
|
||||
color = colorUnderline,
|
||||
start = Offset(xStart, yPos),
|
||||
end = Offset(xEnd, yPos)
|
||||
)
|
||||
|
|
@ -625,6 +617,7 @@ fun LazyVerticalGridTUO(
|
|||
val focusRequester = remember { FocusRequester() }
|
||||
var selectedGridIndex by remember { mutableStateOf(0) }
|
||||
|
||||
val colorUnderline = MaterialTheme.colorScheme.onSecondary
|
||||
LaunchedEffect(tuoList) {
|
||||
showContextualMenu = false
|
||||
showEditDialog = false
|
||||
|
|
@ -849,7 +842,7 @@ fun LazyVerticalGridTUO(
|
|||
Canvas(modifier = Modifier.fillMaxSize()) {
|
||||
val arcWidth = size.width * 0.65f
|
||||
drawArc(
|
||||
color = FEUFAROO_TRIOLET_COLOR,
|
||||
color = colorUnderline,
|
||||
startAngle = 200f,
|
||||
sweepAngle = 140f,
|
||||
useCenter = false,
|
||||
|
|
@ -877,13 +870,13 @@ fun LazyVerticalGridTUO(
|
|||
val yBottom = hairpinHeight + offsetUp
|
||||
|
||||
drawLine(
|
||||
Color.DarkGray,
|
||||
color = colorUnderline,
|
||||
start = Offset(x = xStart, y = yTop),
|
||||
end = Offset(xEnd, yCenter),
|
||||
strokeWidth = 0.5f
|
||||
)
|
||||
drawLine(
|
||||
Color.DarkGray,
|
||||
color = colorUnderline,
|
||||
start = Offset(xStart, yBottom),
|
||||
end = Offset(xEnd, yCenter),
|
||||
strokeWidth = 0.5f
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue