mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
fix the overlapping options in the concurrency dialog
ChoiceGroup emitted its header and option rows as siblings straight into the AlertDialog text slot, and they drew on top of each other, leaving only one radio visible with garbled labels. Wrap the group in its own Column so the rows stack, and cover it with a test that asserts the presets occupy separate rows.
This commit is contained in:
@@ -323,15 +323,17 @@ private fun <T> ChoiceGroup(
|
||||
selected: T,
|
||||
onSelect: (T) -> Unit,
|
||||
) {
|
||||
Text(header, style = MaterialTheme.typography.titleSmall, color = MaterialTheme.colorScheme.primary)
|
||||
options.forEach { (value, label) ->
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.fillMaxWidth().clickable { onSelect(value) },
|
||||
) {
|
||||
RadioButton(selected = value == selected, onClick = { onSelect(value) })
|
||||
Spacer(Modifier.width(8.dp))
|
||||
Text(label)
|
||||
Column {
|
||||
Text(header, style = MaterialTheme.typography.titleSmall, color = MaterialTheme.colorScheme.primary)
|
||||
options.forEach { (value, label) ->
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.fillMaxWidth().clickable { onSelect(value) },
|
||||
) {
|
||||
RadioButton(selected = value == selected, onClick = { onSelect(value) })
|
||||
Spacer(Modifier.width(8.dp))
|
||||
Text(label)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user