Skip to content

Commit

Permalink
Slightly tweak weights
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp committed Dec 17, 2023
1 parent f162bb9 commit 42ac33a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/src/main/java/be/chvp/nanoledger/ui/add/AddActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -364,28 +364,28 @@ fun PostingRow(
addViewModel: AddViewModel = viewModel(),
) {
val currencyBeforeAmount by addViewModel.currencyBeforeAmount.observeAsState()
Row(modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp, horizontal = 4.dp)) {
Row(modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp, horizontal = 2.dp)) {
AccountSelector(
index = index,
value = posting.first,
modifier = Modifier.weight(2f),
modifier = Modifier.weight(2.2f).padding(horizontal = 2.dp),
)
if (currencyBeforeAmount ?: true) {
CurrencyField(index, posting, Modifier.weight(0.9f).padding(horizontal = 4.dp))
CurrencyField(index, posting, Modifier.weight(0.95f).padding(horizontal = 2.dp))
AmountField(
index,
posting,
firstEmptyAmount,
Modifier.weight(1.3f),
Modifier.weight(1.25f).padding(horizontal = 2.dp),
)
} else {
AmountField(
index,
posting,
firstEmptyAmount,
Modifier.weight(1.3f).padding(horizontal = 4.dp),
Modifier.weight(1.25f).padding(horizontal = 2.dp),
)
CurrencyField(index, posting, Modifier.weight(0.9f))
CurrencyField(index, posting, Modifier.weight(0.95f).padding(horizontal = 2.dp))
}
}
}
Expand Down

0 comments on commit 42ac33a

Please sign in to comment.