Colour the divider rules to match their words
A compaction line and a clear line each read as one mark now, rather than a coloured phrase sitting in a grey rule that looked unrelated to it.
This commit is contained in:
1 parent
451afb50d5
commit
81c8a57181
1 file changed
+4
-5
@@ -21,9 +21,8 @@ import androidx.compose.ui.unit.dp
|
|||||||
* reader scrolling back, both mean "the session no longer has what is above this", and which of the
|
* reader scrolling back, both mean "the session no longer has what is above this", and which of the
|
||||||
* two it was is said by the words and the colour.
|
* two it was is said by the words and the colour.
|
||||||
*
|
*
|
||||||
* The rules stay the ordinary divider colour whatever [color] is. They are framing: the words are
|
* The rules take [color] too, so the whole divider reads as one mark of one kind rather than a
|
||||||
* what carries the meaning, and colouring the lines too would make the framing look like it were
|
* coloured phrase sitting in an unrelated grey line.
|
||||||
* carrying some of it.
|
|
||||||
*
|
*
|
||||||
* Written once here rather than styled at each of them, so the two cannot drift into looking like
|
* Written once here rather than styled at each of them, so the two cannot drift into looking like
|
||||||
* different kinds of thing.
|
* different kinds of thing.
|
||||||
@@ -35,9 +34,9 @@ fun TranscriptDivider(text: String, color: Color, modifier: Modifier = Modifier)
|
|||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
modifier = modifier.fillMaxWidth().padding(vertical = 8.dp),
|
modifier = modifier.fillMaxWidth().padding(vertical = 8.dp),
|
||||||
) {
|
) {
|
||||||
HorizontalDivider(Modifier.weight(1f))
|
HorizontalDivider(Modifier.weight(1f), color = color)
|
||||||
Text(text, style = MaterialTheme.typography.bodySmall, color = color)
|
Text(text, style = MaterialTheme.typography.bodySmall, color = color)
|
||||||
HorizontalDivider(Modifier.weight(1f))
|
HorizontalDivider(Modifier.weight(1f), color = color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user