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 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 currentDensity = LocalDensity.current
|
||||||
|
val colorUnderline = MaterialTheme.colorScheme.onSecondary
|
||||||
val animatedColor = if (gridActive) {
|
val animatedColor = if (gridActive) {
|
||||||
animateColorAsState(
|
animateColorAsState(
|
||||||
targetValue = MaterialTheme.colorScheme.secondary.copy(alpha = 1f),
|
targetValue = MaterialTheme.colorScheme.secondary.copy(alpha = 1f),
|
||||||
|
|
@ -450,20 +450,12 @@ fun TimeUnitComposable(
|
||||||
xEnd = textLayoutResult?.getCursorRect(globalEndIndex)?.right ?: size.width
|
xEnd = textLayoutResult?.getCursorRect(globalEndIndex)?.right ?: size.width
|
||||||
}
|
}
|
||||||
//if (it.underlineSpec.size > 0) {
|
//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
|
val totalHeight = textLayoutResult?.size?.height ?: 0
|
||||||
// # FIX
|
// # FIX
|
||||||
val nbNotes = multiLineText.count { it == '\n' } +1
|
val nbNotes = multiLineText.count { it == '\n' } +1
|
||||||
val yPos = ta.voiceNumber * totalHeight.toFloat() / nbNotes
|
val yPos = ta.voiceNumber * totalHeight.toFloat() / nbNotes
|
||||||
drawLine(
|
drawLine(
|
||||||
colorUnderline,
|
color = colorUnderline,
|
||||||
start = Offset(xStart, yPos),
|
start = Offset(xStart, yPos),
|
||||||
end = Offset(xEnd, yPos)
|
end = Offset(xEnd, yPos)
|
||||||
)
|
)
|
||||||
|
|
@ -625,6 +617,7 @@ fun LazyVerticalGridTUO(
|
||||||
val focusRequester = remember { FocusRequester() }
|
val focusRequester = remember { FocusRequester() }
|
||||||
var selectedGridIndex by remember { mutableStateOf(0) }
|
var selectedGridIndex by remember { mutableStateOf(0) }
|
||||||
|
|
||||||
|
val colorUnderline = MaterialTheme.colorScheme.onSecondary
|
||||||
LaunchedEffect(tuoList) {
|
LaunchedEffect(tuoList) {
|
||||||
showContextualMenu = false
|
showContextualMenu = false
|
||||||
showEditDialog = false
|
showEditDialog = false
|
||||||
|
|
@ -849,7 +842,7 @@ fun LazyVerticalGridTUO(
|
||||||
Canvas(modifier = Modifier.fillMaxSize()) {
|
Canvas(modifier = Modifier.fillMaxSize()) {
|
||||||
val arcWidth = size.width * 0.65f
|
val arcWidth = size.width * 0.65f
|
||||||
drawArc(
|
drawArc(
|
||||||
color = FEUFAROO_TRIOLET_COLOR,
|
color = colorUnderline,
|
||||||
startAngle = 200f,
|
startAngle = 200f,
|
||||||
sweepAngle = 140f,
|
sweepAngle = 140f,
|
||||||
useCenter = false,
|
useCenter = false,
|
||||||
|
|
@ -877,13 +870,13 @@ fun LazyVerticalGridTUO(
|
||||||
val yBottom = hairpinHeight + offsetUp
|
val yBottom = hairpinHeight + offsetUp
|
||||||
|
|
||||||
drawLine(
|
drawLine(
|
||||||
Color.DarkGray,
|
color = colorUnderline,
|
||||||
start = Offset(x = xStart, y = yTop),
|
start = Offset(x = xStart, y = yTop),
|
||||||
end = Offset(xEnd, yCenter),
|
end = Offset(xEnd, yCenter),
|
||||||
strokeWidth = 0.5f
|
strokeWidth = 0.5f
|
||||||
)
|
)
|
||||||
drawLine(
|
drawLine(
|
||||||
Color.DarkGray,
|
color = colorUnderline,
|
||||||
start = Offset(xStart, yBottom),
|
start = Offset(xStart, yBottom),
|
||||||
end = Offset(xEnd, yCenter),
|
end = Offset(xEnd, yCenter),
|
||||||
strokeWidth = 0.5f
|
strokeWidth = 0.5f
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue