diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt index 39de173a1e..d12e44f66f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt @@ -83,7 +83,11 @@ internal fun StartConversationScreen( style = small ) Spacer(modifier = Modifier.height(LocalDimensions.current.smallItemSpacing)) - QrImage(string = accountId, Modifier.contentDescription(R.string.AccessibilityId_qr_code)) + QrImage( + string = accountId, + Modifier.contentDescription(R.string.AccessibilityId_qr_code), + icon = R.drawable.session + ) } } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt index 524cc2a98c..1d83a0fbfa 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt @@ -23,6 +23,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter +import androidx.compose.ui.unit.dp import network.loki.messenger.R import org.thoughtcrime.securesms.ui.CellWithPaddingAndMargin import org.thoughtcrime.securesms.ui.LocalDimensions @@ -100,6 +101,7 @@ private fun RecoveryPasswordCell( modifier = Modifier .padding(vertical = LocalDimensions.current.smallMargin) .contentDescription(R.string.AccessibilityId_qr_code), + contentPadding = 10.dp, icon = R.drawable.session_shield ) } diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt index 530aebd457..48d81aa723 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt @@ -27,6 +27,7 @@ import androidx.compose.ui.graphics.FilterQuality import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -39,6 +40,7 @@ import org.thoughtcrime.securesms.util.QRCodeUtilities fun QrImage( string: String?, modifier: Modifier = Modifier, + contentPadding: Dp = LocalDimensions.current.smallItemSpacing, icon: Int = R.drawable.session_shield ) { var bitmap: Bitmap? by remember { @@ -58,7 +60,7 @@ fun QrImage( backgroundColor = LocalColors.current.qrCodeBackground, elevation = 0.dp, modifier = modifier - ) { Content(bitmap, icon, backgroundColor = LocalColors.current.qrCodeBackground) } + ) { Content(bitmap, icon, Modifier.padding(contentPadding), backgroundColor = LocalColors.current.qrCodeBackground) } } @Composable @@ -71,7 +73,6 @@ private fun Content( ) { Box( modifier = modifier - .padding(LocalDimensions.current.xxxsItemSpacing) .fillMaxWidth() .aspectRatio(1f) ) {