From 106a0b7b78a1ce09d965b15b1dc5e716f63eb7c9 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Thu, 8 Aug 2024 14:33:41 +0200 Subject: [PATCH] make buttons distinguishable and translatable --- .../vastapp/activity/dashboard/screen/Instances.kt | 11 ++++++++--- app/src/main/res/values-pl/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Instances.kt b/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Instances.kt index 30e0d5d..cab43a3 100644 --- a/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Instances.kt +++ b/app/src/main/java/eu/m724/vastapp/activity/dashboard/screen/Instances.kt @@ -21,8 +21,10 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Card import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable @@ -227,14 +229,17 @@ fun InstanceDeleteDialog( TextButton( onClick = { onConfirm() } ) { - Text("Confirm") + Text(stringResource(id = R.string.confirm)) } }, dismissButton = { TextButton( - onClick = { onClose() } + onClick = { onClose() }, + colors = ButtonDefaults.textButtonColors().copy( + contentColor = MaterialTheme.colorScheme.error + ) ) { - Text("Dismiss") + Text(stringResource(id = R.string.dismiss)) } }, title = { diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 5eaa220..52f4505 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -33,4 +33,6 @@ Jeszcze nie możesz wynajmować z tej aplikacji Potwierdź usunięcie Instancja #%1$d (%2$s) + Anuluj + Potwierdź \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a863434..dd9eae8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -34,4 +34,6 @@ You can\'t rent from this app yet Confirm deletion Instance #%1$d (%2$s) + Dismiss + Confirm \ No newline at end of file