mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
ui(wallet): lead the wallet row with the drag handle
The DragIndicator sat between the wallet name column and the balance column with verticalAlignment=CenterVertically, so it visually centered between the balance amount and the "sats" subtitle — landing in dead space between two lines. Move it to the start of the row, matching the relay-reorder convention (BasicRelaySetupInfoClickableRow). Same icon, same modifier, same RelayDragState wiring; just promoted from middle to leading slot.
This commit is contained in:
+16
-14
@@ -363,6 +363,22 @@ private fun WalletCard(
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
// Drag handle leads the row — same convention as the
|
||||
// relay reorder list — so a center-aligned icon doesn't
|
||||
// land between the balance amount and its "sats" label.
|
||||
if (dragState != null) {
|
||||
Icon(
|
||||
MaterialSymbols.DragIndicator,
|
||||
contentDescription = stringRes(R.string.wallet_reorder),
|
||||
modifier =
|
||||
Modifier
|
||||
.size(24.dp)
|
||||
.relayDragHandle(index, dragState),
|
||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
}
|
||||
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(
|
||||
@@ -389,20 +405,6 @@ private fun WalletCard(
|
||||
}
|
||||
}
|
||||
|
||||
// Drag handle for reordering
|
||||
if (dragState != null) {
|
||||
Icon(
|
||||
MaterialSymbols.DragIndicator,
|
||||
contentDescription = stringRes(R.string.wallet_reorder),
|
||||
modifier =
|
||||
Modifier
|
||||
.size(24.dp)
|
||||
.relayDragHandle(index, dragState),
|
||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
}
|
||||
|
||||
// Balance
|
||||
if (walletInfo.isLoading && walletInfo.balanceSats == null) {
|
||||
CircularProgressIndicator(modifier = Modifier.size(24.dp))
|
||||
|
||||
Reference in New Issue
Block a user