Skip to content

Commit

Permalink
Fix action button modifier in Receive Address screen
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelekol committed Dec 25, 2023
1 parent 8c788e9 commit 2fe85a7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,10 @@ private fun ActionButtonsRow(
.padding(horizontal = 48.dp),
horizontalArrangement = if (watchAccount) Arrangement.Center else Arrangement.SpaceBetween,
) {
val itemModifier = if(watchAccount) Modifier else Modifier.weight(1f)
if (!watchAccount) {
ReceiveActionButton(
modifier = itemModifier,
icon = R.drawable.ic_edit_24px,
buttonText = stringResource(R.string.Button_SetAmount),
onClick = {
Expand All @@ -340,6 +342,7 @@ private fun ActionButtonsRow(
)
}
ReceiveActionButton(
modifier = itemModifier,
icon = R.drawable.ic_share_24px,
buttonText = stringResource(R.string.Button_Share),
onClick = {
Expand All @@ -350,6 +353,7 @@ private fun ActionButtonsRow(
HSpacer(64.dp)
}
ReceiveActionButton(
modifier = itemModifier,
icon = R.drawable.ic_copy_24px,
buttonText = stringResource(R.string.Button_Copy),
onClick = {
Expand Down Expand Up @@ -445,13 +449,16 @@ private fun AdditionalDataSection(
}
}


@Composable
private fun ReceiveActionButton(
modifier: Modifier,
icon: Int,
buttonText: String,
onClick: () -> Unit,
) {
Column(
modifier = modifier,
horizontalAlignment = Alignment.CenterHorizontally,
) {
ButtonPrimaryCircle(
Expand All @@ -461,6 +468,7 @@ private fun ReceiveActionButton(
caption_grey(
modifier = Modifier.padding(top = 8.dp),
text = buttonText,
textAlign = TextAlign.Center,
)
}
}
Expand Down

0 comments on commit 2fe85a7

Please sign in to comment.