summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-06-15 13:48:21 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-06-15 13:48:21 +0530
commitbfa27750d371c42f904beefe7f98fc4415402766 (patch)
treeaa33941c371855bbb0f7992c49229c2de0346e8c /app
parente4b6c89cc6df1e80adf6ae88291adbbefd08d720 (diff)
fix: ensure PGP key list item works with longer user IDs
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt
index 34cc70a1..fd717a8b 100644
--- a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt
+++ b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt
@@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.AlertDialog
@@ -24,6 +25,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import app.passwordstore.R
@@ -88,9 +90,14 @@ private fun KeyItem(
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
) {
- Text(text = label)
+ Text(
+ text = label,
+ modifier = Modifier.weight(1f),
+ overflow = TextOverflow.Ellipsis,
+ maxLines = 1,
+ )
if (onKeySelected == null) {
- IconButton(onClick = { isDeleting = true }) {
+ IconButton(onClick = { isDeleting = true }, modifier = Modifier.requiredSize(24.dp)) {
Icon(
painter = painterResource(R.drawable.ic_delete_24dp),
stringResource(id = R.string.delete)