Skip to content

Commit 102ccea

Browse files
committed
fix: make qr buttons fill the width
1 parent 834ca75 commit 102ccea

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveQrScreen.kt

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -354,31 +354,36 @@ private fun ReceiveQrView(
354354
modifier = Modifier.size(18.dp)
355355
)
356356
},
357-
modifier = Modifier.testTag("SpecifyInvoiceButton")
357+
modifier = Modifier
358+
.weight(1f)
359+
.testTag("SpecifyInvoiceButton")
358360
)
359-
Tooltip(
360-
text = stringResource(R.string.wallet__receive_copied),
361-
tooltipState = qrButtonTooltipState
362-
) {
363-
PrimaryButton(
364-
text = stringResource(R.string.common__copy),
365-
size = ButtonSize.Small,
366-
onClick = {
367-
context.setClipboardText(uri)
368-
coroutineScope.launch { qrButtonTooltipState.show() }
369-
},
370-
fullWidth = false,
371-
color = Colors.White10,
372-
icon = {
373-
Icon(
374-
painter = painterResource(R.drawable.ic_copy),
375-
contentDescription = null,
376-
tint = tab.accentColor,
377-
modifier = Modifier.size(18.dp)
378-
)
379-
},
380-
modifier = Modifier.testTag("ReceiveCopyQR")
381-
)
361+
Box(modifier = Modifier.weight(1f)) {
362+
Tooltip(
363+
text = stringResource(R.string.wallet__receive_copied),
364+
tooltipState = qrButtonTooltipState
365+
) {
366+
PrimaryButton(
367+
text = stringResource(R.string.common__copy),
368+
size = ButtonSize.Small,
369+
onClick = {
370+
context.setClipboardText(uri)
371+
coroutineScope.launch { qrButtonTooltipState.show() }
372+
},
373+
fullWidth = true,
374+
color = Colors.White10,
375+
icon = {
376+
Icon(
377+
painter = painterResource(R.drawable.ic_copy),
378+
contentDescription = null,
379+
tint = tab.accentColor,
380+
modifier = Modifier.size(18.dp)
381+
)
382+
},
383+
modifier = Modifier
384+
.testTag("ReceiveCopyQR")
385+
)
386+
}
382387
}
383388
PrimaryButton(
384389
text = stringResource(R.string.common__share),
@@ -398,6 +403,7 @@ private fun ReceiveQrView(
398403
modifier = Modifier.size(18.dp)
399404
)
400405
},
406+
modifier = Modifier.weight(1f)
401407
)
402408
}
403409
Spacer(modifier = Modifier.height(16.dp))

0 commit comments

Comments
 (0)