Skip to content

Commit 3c3d2e8

Browse files
committed
use chips instead of the weird button row
1 parent 0f129ef commit 3c3d2e8

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

composeApp/src/commonMain/kotlin/me/lkl/dalvikus/ui/packaging/PackagingView.kt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.compose.material.icons.Icons
1212
import androidx.compose.material.icons.filled.Key
1313
import androidx.compose.material.icons.outlined.Android
1414
import androidx.compose.material.icons.outlined.Draw
15+
import androidx.compose.material.icons.outlined.Error
1516
import androidx.compose.material.icons.outlined.InstallMobile
1617
import androidx.compose.material.icons.outlined.Key
1718
import androidx.compose.material3.*
@@ -256,17 +257,23 @@ fun SignatureStatus(
256257
Column {
257258
Text(stringResource(Res.string.signature_validity), style = MaterialTheme.typography.titleSmall)
258259

259-
MultiChoiceSegmentedButtonRow(
260-
modifier = Modifier.align(alignment = Alignment.CenterHorizontally)
260+
FlowRow(
261+
horizontalArrangement = Arrangement.spacedBy(8.dp),
261262
) {
262263
texts.forEachIndexed { index, label ->
263-
SegmentedButton(
264-
shape = SegmentedButtonDefaults.itemShape(index = index, count = texts.size),
265-
onCheckedChange = {},
266-
checked = levels[index],
267-
) {
268-
Text(label)
269-
}
264+
FilterChip(
265+
// TODO remove elevation = null when https://youtrack.jetbrains.com/issue/CMP-2868 is fixed.
266+
elevation = null,
267+
selected = levels[index],
268+
onClick = {},
269+
leadingIcon = {
270+
Icon(
271+
imageVector = if (levels[index]) Icons.Outlined.Key else Icons.Outlined.Error,
272+
contentDescription = null
273+
)
274+
},
275+
label = { Text(label) }
276+
)
270277
}
271278
}
272279

0 commit comments

Comments
 (0)