From 95900db8256808c851083fc15d3525492a04cab3 Mon Sep 17 00:00:00 2001
From: 0que <0que@users.noreply.hosted.weblate.org>
Date: Thu, 2 Nov 2023 16:44:01 +0000
Subject: [PATCH 01/14] Translated using Weblate (Russian)
Currently translated at 100.0% (554 of 554 strings)
Translation: Neo Launcher/Omega Launcher
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/omegalauncher/ru/
---
Omega/res/values-ru/strings.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Omega/res/values-ru/strings.xml b/Omega/res/values-ru/strings.xml
index e3a21552db..524f65ce5a 100644
--- a/Omega/res/values-ru/strings.xml
+++ b/Omega/res/values-ru/strings.xml
@@ -192,7 +192,7 @@
Круг
Скругленный квадрат
Квадрат
- Система
+ Системная
на домашнем экране
Изменить форму иконки
Применение изменений формы иконки
@@ -212,7 +212,7 @@
темный текст
Светлый
Задано темой
- Система
+ Как в системе
В соответствии с обоями
Размытие фона страницы
Наборы иконок
@@ -365,7 +365,7 @@
Скрытые и защищенные приложения
Включить защищенные приложения
Отключить защищенные приложения, требующие аутентификации
- Система (черная)
+ Как в системе (чёрная)
Сообщество
Bluetooth
Режим рабочего стола
From 92516029ed9304809e921b6e00a92c16e90c5082 Mon Sep 17 00:00:00 2001
From: Massimo Pissarello
Date: Fri, 3 Nov 2023 20:04:29 +0000
Subject: [PATCH 02/14] Translated using Weblate (Italian)
Currently translated at 100.0% (9 of 9 strings)
Translation: Neo Launcher/Fastlane
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/fastlane/it/
---
fastlane/metadata/android/it/changelogs/934.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fastlane/metadata/android/it/changelogs/934.txt b/fastlane/metadata/android/it/changelogs/934.txt
index e012079f7f..2be7cb9d7e 100644
--- a/fastlane/metadata/android/it/changelogs/934.txt
+++ b/fastlane/metadata/android/it/changelogs/934.txt
@@ -5,4 +5,4 @@ Aggiornato: tutte le nuove impostazioni UI/UX
Corretto: problema con le icone fantasma
Corretto: compatibilità dei backup tra release/neo/debug
Corretto: ordinamento delle app in base alla lingua locale
-Per maggiori dettagli controlla il log delle modifiche completo…
+Per maggiori dettagli controlla il registro completo delle modifiche…
From 1b2225df588ccb7837f701a8d987e1384975d1be Mon Sep 17 00:00:00 2001
From: Rex_sa
Date: Fri, 3 Nov 2023 22:48:51 +0000
Subject: [PATCH 03/14] Translated using Weblate (Arabic)
Currently translated at 100.0% (557 of 557 strings)
Translation: Neo Launcher/Omega Launcher
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/omegalauncher/ar/
---
Omega/res/values-ar/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Omega/res/values-ar/strings.xml b/Omega/res/values-ar/strings.xml
index 26aa24c745..3e1222bced 100644
--- a/Omega/res/values-ar/strings.xml
+++ b/Omega/res/values-ar/strings.xml
@@ -513,4 +513,7 @@
الفارسي
الميلادي
المجتمع على ماتريكس
+ تن توسيع الرف
+ تم طي الرف
+ رف قابل لتوسع
\ No newline at end of file
From 45dfaa1faf949045f7e22b00acd279e712d83e12 Mon Sep 17 00:00:00 2001
From: gallegonovato
Date: Fri, 3 Nov 2023 18:55:29 +0000
Subject: [PATCH 04/14] Translated using Weblate (Spanish)
Currently translated at 100.0% (557 of 557 strings)
Translation: Neo Launcher/Omega Launcher
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/omegalauncher/es/
---
Omega/res/values-es/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Omega/res/values-es/strings.xml b/Omega/res/values-es/strings.xml
index 5ca07ee29e..2dc5e831ee 100644
--- a/Omega/res/values-es/strings.xml
+++ b/Omega/res/values-es/strings.xml
@@ -507,4 +507,7 @@
Botón de Recientes
La Comunidad en Telegram
La Comunidad en Matrix
+ Dock expandido
+ Dock colapsado
+ Dock Ampliable
\ No newline at end of file
From 7dee17cb0f6886c85de2f22e912eb242b135c38f Mon Sep 17 00:00:00 2001
From: Massimo Pissarello
Date: Fri, 3 Nov 2023 19:59:42 +0000
Subject: [PATCH 05/14] Translated using Weblate (Italian)
Currently translated at 100.0% (557 of 557 strings)
Translation: Neo Launcher/Omega Launcher
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/omegalauncher/it/
---
Omega/res/values-it/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Omega/res/values-it/strings.xml b/Omega/res/values-it/strings.xml
index 8466f69a76..9496597114 100644
--- a/Omega/res/values-it/strings.xml
+++ b/Omega/res/values-it/strings.xml
@@ -522,4 +522,7 @@
Seleziona calendario
Pulsante recenti
Comunità su Matrix
+ Barra app aperta
+ Barra app chiusa
+ Barra app espandibile
\ No newline at end of file
From 15bb7ad58fa9d307ea0b5c02f788c6cb6c0b337c Mon Sep 17 00:00:00 2001
From: Colorful Rhino
Date: Sun, 5 Nov 2023 22:18:21 +0000
Subject: [PATCH 06/14] Translated using Weblate (German)
Currently translated at 100.0% (557 of 557 strings)
Translation: Neo Launcher/Omega Launcher
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/omegalauncher/de/
---
Omega/res/values-de/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Omega/res/values-de/strings.xml b/Omega/res/values-de/strings.xml
index f912410419..2dda2ec0de 100644
--- a/Omega/res/values-de/strings.xml
+++ b/Omega/res/values-de/strings.xml
@@ -505,4 +505,7 @@
Community auf Matrix
Zeitformat
Persisch
+ Dock ausgeklappt
+ Dock eingeklappt
+ Ausklappbares Dock
\ No newline at end of file
From 1061852cd8c94b769d5ed6b34f1f009a7da01649 Mon Sep 17 00:00:00 2001
From: abc0922001
Date: Mon, 6 Nov 2023 06:26:57 +0000
Subject: [PATCH 07/14] Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (557 of 557 strings)
Translation: Neo Launcher/Omega Launcher
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/omegalauncher/zh_Hant/
---
Omega/res/values-zh-rTW/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Omega/res/values-zh-rTW/strings.xml b/Omega/res/values-zh-rTW/strings.xml
index cb76d99ad0..7d9bbcebdd 100644
--- a/Omega/res/values-zh-rTW/strings.xml
+++ b/Omega/res/values-zh-rTW/strings.xml
@@ -500,4 +500,7 @@
Phind(網頁)
Perplexity(網頁)
Searx(網頁)
+ Dock 展開
+ Dock 收起
+ 擴展 Dock
\ No newline at end of file
From aed458e26bc20bbc5553279b04a3c4c12e6212de Mon Sep 17 00:00:00 2001
From: 0que <0que@users.noreply.hosted.weblate.org>
Date: Thu, 9 Nov 2023 14:16:54 +0000
Subject: [PATCH 08/14] Translated using Weblate (Russian)
Currently translated at 100.0% (557 of 557 strings)
Translation: Neo Launcher/Omega Launcher
Translate-URL: https://hosted.weblate.org/projects/omegalauncher/omegalauncher/ru/
---
Omega/res/values-ru/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Omega/res/values-ru/strings.xml b/Omega/res/values-ru/strings.xml
index 524f65ce5a..5a544a5b43 100644
--- a/Omega/res/values-ru/strings.xml
+++ b/Omega/res/values-ru/strings.xml
@@ -509,4 +509,7 @@
Neeva (Веб)
Wolfram Alpha (Веб)
Perplexity (Веб)
+ Панель развёрнута
+ Панель свёрнута
+ Разворачиваемая панель
\ No newline at end of file
From e117e571fbf4b0c93d4a6a4f7d6daebee470f7f7 Mon Sep 17 00:00:00 2001
From: Saul Henriquez
Date: Sun, 3 Dec 2023 10:41:41 -0600
Subject: [PATCH 09/14] Change long selection dialog UI
Signed-off-by: Saul Henriquez
---
.../preferences/SelectionPrefDialogUI.kt | 63 ++++++++++---------
Omega/src/com/saggitt/omega/util/modifier.kt | 12 ++--
2 files changed, 38 insertions(+), 37 deletions(-)
diff --git a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
index 403d18f480..c5bb720b15 100644
--- a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
@@ -105,13 +105,13 @@ fun IntSelectionPrefDialogUI(
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
modifier = Modifier
- .padding(vertical = 8.dp, horizontal = 4.dp)
- .weight(1f, false)
- .background(
- MaterialTheme.colorScheme.background,
- MaterialTheme.shapes.extraLarge
- )
- .blockBorder()
+ .padding(vertical = 8.dp, horizontal = 4.dp)
+ .weight(1f, false)
+ .background(
+ MaterialTheme.colorScheme.background,
+ MaterialTheme.shapes.extraLarge
+ )
+ .blockBorder()
) {
item {
Spacer(modifier = Modifier.height(4.dp))
@@ -133,9 +133,9 @@ fun IntSelectionPrefDialogUI(
}
Row(
- Modifier
- .fillMaxWidth()
- .padding(horizontal = 12.dp),
+ Modifier
+ .fillMaxWidth()
+ .padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
@@ -193,9 +193,10 @@ fun LongSelectionPrefDialogUI(
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
modifier = Modifier
- .padding(vertical = 8.dp)
- .weight(1f, false)
- .blockBorder(),
+ .padding(vertical = 8.dp, horizontal = 4.dp)
+ .weight(1f, false)
+ .background(color = MaterialTheme.colorScheme.background, shape = MaterialTheme.shapes.extraLarge)
+ .blockBorder(),
) {
items(items = entryPairs) {
val isSelected = rememberSaveable(selected) {
@@ -211,9 +212,9 @@ fun LongSelectionPrefDialogUI(
}
Row(
- Modifier
- .fillMaxWidth()
- .padding(horizontal = 12.dp),
+ Modifier
+ .fillMaxWidth()
+ .padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
@@ -262,9 +263,9 @@ fun StringSelectionPrefDialogUI(
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
modifier = Modifier
- .padding(vertical = 8.dp)
- .weight(1f, false)
- .blockBorder()
+ .padding(vertical = 8.dp)
+ .weight(1f, false)
+ .blockBorder()
) {
items(items = entryPairs) {
val isSelected = rememberSaveable(selected) {
@@ -280,9 +281,9 @@ fun StringSelectionPrefDialogUI(
}
Row(
- Modifier
- .fillMaxWidth()
- .padding(horizontal = 12.dp),
+ Modifier
+ .fillMaxWidth()
+ .padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
@@ -331,9 +332,9 @@ fun StringMultiSelectionPrefDialogUI(
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
modifier = Modifier
- .padding(vertical = 8.dp)
- .weight(1f, false)
- .blockBorder()
+ .padding(vertical = 8.dp)
+ .weight(1f, false)
+ .blockBorder()
) {
items(items = entryPairs) { item ->
val isSelected = rememberSaveable(selected) {
@@ -353,9 +354,9 @@ fun StringMultiSelectionPrefDialogUI(
}
Row(
- Modifier
- .fillMaxWidth()
- .padding(horizontal = 12.dp),
+ Modifier
+ .fillMaxWidth()
+ .padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
@@ -410,9 +411,9 @@ fun ResetCustomIconsDialog(
Spacer(modifier = Modifier.height(16.dp))
Row(
- Modifier
- .fillMaxWidth()
- .padding(horizontal = 12.dp),
+ Modifier
+ .fillMaxWidth()
+ .padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
diff --git a/Omega/src/com/saggitt/omega/util/modifier.kt b/Omega/src/com/saggitt/omega/util/modifier.kt
index 489703af05..3321ff1a97 100644
--- a/Omega/src/com/saggitt/omega/util/modifier.kt
+++ b/Omega/src/com/saggitt/omega/util/modifier.kt
@@ -21,10 +21,10 @@ inline fun Modifier.addIfNotNull(
fun Modifier.blockBorder() = composed {
this
- .clip(MaterialTheme.shapes.extraLarge)
- .border(
- 2.dp,
- MaterialTheme.colorScheme.outlineVariant,
- MaterialTheme.shapes.extraLarge,
- )
+ .clip(MaterialTheme.shapes.extraLarge)
+ .border(
+ 1.dp,
+ MaterialTheme.colorScheme.outlineVariant,
+ MaterialTheme.shapes.extraLarge,
+ )
}
From c6a13d81b30016f67caff61126c5870e5fd05582 Mon Sep 17 00:00:00 2001
From: Saul Henriquez
Date: Sun, 3 Dec 2023 10:50:47 -0600
Subject: [PATCH 10/14] Change string selection dialog UI
Signed-off-by: Saul Henriquez
---
.../compose/components/preferences/SelectionPrefDialogUI.kt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
index c5bb720b15..425d0be82b 100644
--- a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
@@ -263,8 +263,12 @@ fun StringSelectionPrefDialogUI(
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
modifier = Modifier
- .padding(vertical = 8.dp)
+ .padding(vertical = 8.dp, horizontal = 4.dp)
.weight(1f, false)
+ .background(
+ color = MaterialTheme.colorScheme.background,
+ shape = MaterialTheme.shapes.extraLarge
+ )
.blockBorder()
) {
items(items = entryPairs) {
From 2772877208eae996cca6071eb6b5c54bfbdda0d6 Mon Sep 17 00:00:00 2001
From: Saul Henriquez
Date: Sun, 3 Dec 2023 11:10:30 -0600
Subject: [PATCH 11/14] Improve ListItemUI
Signed-off-by: Saul Henriquez
---
.../omega/compose/components/ListItem.kt | 18 ++++++++++--------
.../preferences/SelectionPrefDialogUI.kt | 13 +++++++++++--
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/Omega/src/com/saggitt/omega/compose/components/ListItem.kt b/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
index 1a3db3542c..6d25bad994 100644
--- a/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
@@ -55,8 +55,8 @@ fun SingleSelectionListItem(
) {
Row(
modifier = modifier
- .fillMaxWidth()
- .clickable(onClick = onClick, enabled = isEnabled),
+ .fillMaxWidth()
+ .clickable(onClick = onClick, enabled = isEnabled),
verticalAlignment = Alignment.CenterVertically
) {
RadioButton(
@@ -110,22 +110,24 @@ fun MultiSelectionListItem(
Row(
modifier = modifier
- .padding(start = 16.dp)
- .fillMaxWidth()
- .clickable(onClick = { onClick(!isChecked) }, enabled = isEnabled),
+ .fillMaxWidth()
+ .clickable(onClick = { onClick(!isChecked) }, enabled = isEnabled),
verticalAlignment = Alignment.CenterVertically
) {
if (withIcon) iconIds[iconId]?.let {
Icon(
- modifier = Modifier.size(32.dp),
+ modifier = Modifier
+ .size(32.dp)
+ .padding(start = 16.dp),
painter = painterResource(id = it),
contentDescription = text,
)
- Spacer(modifier = Modifier.width(12.dp))
}
else checkbox()
Text(
- modifier = Modifier.weight(1f),
+ modifier = Modifier
+ .weight(1f)
+ .padding(start = 12.dp),
text = text,
fontSize = 16.sp,
fontWeight = FontWeight.Bold
diff --git a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
index 425d0be82b..6b475b30e4 100644
--- a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
@@ -263,7 +263,9 @@ fun StringSelectionPrefDialogUI(
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
modifier = Modifier
- .padding(vertical = 8.dp, horizontal = 4.dp)
+ .padding(
+ vertical = 8.dp,
+ horizontal = 4.dp)
.weight(1f, false)
.background(
color = MaterialTheme.colorScheme.background,
@@ -271,6 +273,9 @@ fun StringSelectionPrefDialogUI(
)
.blockBorder()
) {
+ item {
+ Spacer(modifier = Modifier.height(4.dp))
+ }
items(items = entryPairs) {
val isSelected = rememberSaveable(selected) {
mutableStateOf(selected == it.first)
@@ -336,8 +341,12 @@ fun StringMultiSelectionPrefDialogUI(
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
modifier = Modifier
- .padding(vertical = 8.dp)
+ .padding(vertical = 8.dp, horizontal = 4.dp)
.weight(1f, false)
+ .background(
+ color = MaterialTheme.colorScheme.background,
+ shape = MaterialTheme.shapes.extraLarge
+ )
.blockBorder()
) {
items(items = entryPairs) { item ->
From 80ac55c3e9695ccbf322288f62173ffc345aef6e Mon Sep 17 00:00:00 2001
From: Saul Henriquez
Date: Sun, 3 Dec 2023 11:19:57 -0600
Subject: [PATCH 12/14] Improve ListItemUI
Signed-off-by: Saul Henriquez
---
Omega/src/com/saggitt/omega/compose/components/ListItem.kt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Omega/src/com/saggitt/omega/compose/components/ListItem.kt b/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
index 6d25bad994..8177c3f6af 100644
--- a/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
@@ -22,6 +22,7 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
@@ -111,14 +112,15 @@ fun MultiSelectionListItem(
Row(
modifier = modifier
.fillMaxWidth()
+ .height(56.dp)
.clickable(onClick = { onClick(!isChecked) }, enabled = isEnabled),
verticalAlignment = Alignment.CenterVertically
) {
if (withIcon) iconIds[iconId]?.let {
+ Spacer(modifier = Modifier.width(16.dp))
Icon(
modifier = Modifier
- .size(32.dp)
- .padding(start = 16.dp),
+ .size(32.dp),
painter = painterResource(id = it),
contentDescription = text,
)
From 8475a8f2ba3c75fb8e4df232c0e9e38a7dd04cd0 Mon Sep 17 00:00:00 2001
From: Saul Henriquez
Date: Sun, 3 Dec 2023 11:20:22 -0600
Subject: [PATCH 13/14] Remove unnecessary padding
Signed-off-by: Saul Henriquez
---
.../preferences/SelectionPrefDialogUI.kt | 273 +++++++++---------
1 file changed, 135 insertions(+), 138 deletions(-)
diff --git a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
index 6b475b30e4..13ed99af29 100644
--- a/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/preferences/SelectionPrefDialogUI.kt
@@ -69,8 +69,8 @@ import kotlinx.coroutines.launch
@Composable
fun IntSelectionPrefDialogUI(
- pref: IntSelectionPref,
- openDialogCustom: MutableState,
+ pref: IntSelectionPref,
+ openDialogCustom: MutableState,
) {
val context = LocalContext.current
val prefs = Utilities.getOmegaPrefs(context)
@@ -92,26 +92,26 @@ fun IntSelectionPrefDialogUI(
val cornerRadius by remember { mutableStateOf(radius) }
Card(
- shape = RoundedCornerShape(cornerRadius),
- modifier = Modifier.padding(12.dp),
- elevation = CardDefaults.elevatedCardElevation(8.dp),
- colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
+ shape = RoundedCornerShape(cornerRadius),
+ modifier = Modifier.padding(12.dp),
+ elevation = CardDefaults.elevatedCardElevation(8.dp),
+ colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
) {
Column(
- modifier = Modifier.padding(vertical = 12.dp),
- horizontalAlignment = Alignment.CenterHorizontally,
- verticalArrangement = Arrangement.spacedBy(8.dp)
+ modifier = Modifier.padding(vertical = 12.dp),
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
- modifier = Modifier
- .padding(vertical = 8.dp, horizontal = 4.dp)
- .weight(1f, false)
- .background(
- MaterialTheme.colorScheme.background,
- MaterialTheme.shapes.extraLarge
- )
- .blockBorder()
+ modifier = Modifier
+ .padding(vertical = 8.dp, horizontal = 4.dp)
+ .weight(1f, false)
+ .background(
+ MaterialTheme.colorScheme.background,
+ MaterialTheme.shapes.extraLarge
+ )
+ .blockBorder()
) {
item {
Spacer(modifier = Modifier.height(4.dp))
@@ -121,8 +121,8 @@ fun IntSelectionPrefDialogUI(
mutableStateOf(selected == it.first)
}
SingleSelectionListItem(
- text = stringResource(id = it.second),
- isSelected = isSelected.value
+ text = stringResource(id = it.second),
+ isSelected = isSelected.value
) {
selected = it.first
}
@@ -136,19 +136,19 @@ fun IntSelectionPrefDialogUI(
Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp),
- horizontalArrangement = Arrangement.SpaceBetween,
+ horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
- cornerRadius = cornerRadius,
- onClick = { openDialogCustom.value = false }
+ cornerRadius = cornerRadius,
+ onClick = { openDialogCustom.value = false }
)
DialogPositiveButton(
- modifier = Modifier.padding(start = 16.dp),
- cornerRadius = cornerRadius,
- onClick = {
- coroutineScope.launch { pref.set(selected) }
- openDialogCustom.value = false
- }
+ modifier = Modifier.padding(start = 16.dp),
+ cornerRadius = cornerRadius,
+ onClick = {
+ coroutineScope.launch { pref.set(selected) }
+ openDialogCustom.value = false
+ }
)
}
}
@@ -157,8 +157,8 @@ fun IntSelectionPrefDialogUI(
@Composable
fun LongSelectionPrefDialogUI(
- pref: LongSelectionPref,
- openDialogCustom: MutableState,
+ pref: LongSelectionPref,
+ openDialogCustom: MutableState,
) {
val context = LocalContext.current
val prefs = Utilities.getOmegaPrefs(context)
@@ -180,31 +180,31 @@ fun LongSelectionPrefDialogUI(
val cornerRadius by remember { mutableStateOf(radius) }
Card(
- shape = RoundedCornerShape(cornerRadius),
- modifier = Modifier.padding(12.dp),
- elevation = CardDefaults.elevatedCardElevation(8.dp),
- colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
+ shape = RoundedCornerShape(cornerRadius),
+ modifier = Modifier.padding(12.dp),
+ elevation = CardDefaults.elevatedCardElevation(8.dp),
+ colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
) {
Column(
- modifier = Modifier.padding(vertical = 12.dp),
- horizontalAlignment = Alignment.CenterHorizontally,
- verticalArrangement = Arrangement.spacedBy(8.dp)
+ modifier = Modifier.padding(vertical = 12.dp),
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
- modifier = Modifier
- .padding(vertical = 8.dp, horizontal = 4.dp)
- .weight(1f, false)
- .background(color = MaterialTheme.colorScheme.background, shape = MaterialTheme.shapes.extraLarge)
- .blockBorder(),
+ modifier = Modifier
+ .padding(vertical = 8.dp, horizontal = 4.dp)
+ .weight(1f, false)
+ .background(color = MaterialTheme.colorScheme.background, shape = MaterialTheme.shapes.extraLarge)
+ .blockBorder(),
) {
items(items = entryPairs) {
val isSelected = rememberSaveable(selected) {
mutableStateOf(selected == it.first)
}
SingleSelectionListItem(
- text = it.second,
- isSelected = isSelected.value
+ text = it.second,
+ isSelected = isSelected.value
) {
selected = it.first
}
@@ -215,18 +215,18 @@ fun LongSelectionPrefDialogUI(
Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp),
- horizontalArrangement = Arrangement.SpaceBetween,
+ horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
- cornerRadius = cornerRadius,
- onClick = { openDialogCustom.value = false }
+ cornerRadius = cornerRadius,
+ onClick = { openDialogCustom.value = false }
)
DialogPositiveButton(
- cornerRadius = cornerRadius,
- onClick = {
- coroutineScope.launch { pref.set(selected) }
- openDialogCustom.value = false
- }
+ cornerRadius = cornerRadius,
+ onClick = {
+ coroutineScope.launch { pref.set(selected) }
+ openDialogCustom.value = false
+ }
)
}
}
@@ -235,8 +235,8 @@ fun LongSelectionPrefDialogUI(
@Composable
fun StringSelectionPrefDialogUI(
- pref: StringSelectionPref,
- openDialogCustom: MutableState,
+ pref: StringSelectionPref,
+ openDialogCustom: MutableState,
) {
val context = LocalContext.current
val prefs = Utilities.getOmegaPrefs(context)
@@ -250,39 +250,36 @@ fun StringSelectionPrefDialogUI(
val cornerRadius by remember { mutableStateOf(radius) }
Card(
- shape = RoundedCornerShape(cornerRadius),
- modifier = Modifier.padding(12.dp),
- elevation = CardDefaults.elevatedCardElevation(8.dp),
- colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
+ shape = RoundedCornerShape(cornerRadius),
+ modifier = Modifier.padding(12.dp),
+ elevation = CardDefaults.elevatedCardElevation(8.dp),
+ colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
) {
Column(
- modifier = Modifier.padding(vertical = 12.dp),
- horizontalAlignment = Alignment.CenterHorizontally,
- verticalArrangement = Arrangement.spacedBy(8.dp)
+ modifier = Modifier.padding(vertical = 12.dp),
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
- modifier = Modifier
- .padding(
- vertical = 8.dp,
- horizontal = 4.dp)
- .weight(1f, false)
- .background(
- color = MaterialTheme.colorScheme.background,
- shape = MaterialTheme.shapes.extraLarge
- )
- .blockBorder()
+ modifier = Modifier
+ .padding(
+ vertical = 8.dp,
+ horizontal = 4.dp)
+ .weight(1f, false)
+ .background(
+ color = MaterialTheme.colorScheme.background,
+ shape = MaterialTheme.shapes.extraLarge
+ )
+ .blockBorder()
) {
- item {
- Spacer(modifier = Modifier.height(4.dp))
- }
items(items = entryPairs) {
val isSelected = rememberSaveable(selected) {
mutableStateOf(selected == it.first)
}
SingleSelectionListItem(
- text = it.second,
- isSelected = isSelected.value
+ text = it.second,
+ isSelected = isSelected.value
) {
selected = it.first
}
@@ -293,18 +290,18 @@ fun StringSelectionPrefDialogUI(
Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp),
- horizontalArrangement = Arrangement.SpaceBetween,
+ horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
- cornerRadius = cornerRadius,
- onClick = { openDialogCustom.value = false }
+ cornerRadius = cornerRadius,
+ onClick = { openDialogCustom.value = false }
)
DialogPositiveButton(
- cornerRadius = cornerRadius,
- onClick = {
- pref.setValue(selected)
- openDialogCustom.value = false
- }
+ cornerRadius = cornerRadius,
+ onClick = {
+ pref.setValue(selected)
+ openDialogCustom.value = false
+ }
)
}
}
@@ -313,8 +310,8 @@ fun StringSelectionPrefDialogUI(
@Composable
fun StringMultiSelectionPrefDialogUI(
- pref: StringMultiSelectionPref,
- openDialogCustom: MutableState,
+ pref: StringMultiSelectionPref,
+ openDialogCustom: MutableState,
) {
val context = LocalContext.current
val prefs = Utilities.getOmegaPrefs(context)
@@ -328,26 +325,26 @@ fun StringMultiSelectionPrefDialogUI(
val cornerRadius by remember { mutableStateOf(radius) }
Card(
- shape = RoundedCornerShape(cornerRadius),
- modifier = Modifier.padding(12.dp),
- elevation = CardDefaults.elevatedCardElevation(8.dp),
- colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
+ shape = RoundedCornerShape(cornerRadius),
+ modifier = Modifier.padding(12.dp),
+ elevation = CardDefaults.elevatedCardElevation(8.dp),
+ colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
) {
Column(
- modifier = Modifier.padding(vertical = 12.dp),
- horizontalAlignment = Alignment.CenterHorizontally,
- verticalArrangement = Arrangement.spacedBy(8.dp)
+ modifier = Modifier.padding(vertical = 12.dp),
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
LazyColumn(
- modifier = Modifier
- .padding(vertical = 8.dp, horizontal = 4.dp)
- .weight(1f, false)
- .background(
- color = MaterialTheme.colorScheme.background,
- shape = MaterialTheme.shapes.extraLarge
- )
- .blockBorder()
+ modifier = Modifier
+ .padding(vertical = 8.dp, horizontal = 4.dp)
+ .weight(1f, false)
+ .background(
+ color = MaterialTheme.colorScheme.background,
+ shape = MaterialTheme.shapes.extraLarge
+ )
+ .blockBorder()
) {
items(items = entryPairs) { item ->
val isSelected = rememberSaveable(selected) {
@@ -355,10 +352,10 @@ fun StringMultiSelectionPrefDialogUI(
}
MultiSelectionListItem(
- text = stringResource(id = item.second),
- isChecked = isSelected.value,
- withIcon = pref.withIcons,
- iconId = item.first
+ text = stringResource(id = item.second),
+ isChecked = isSelected.value,
+ withIcon = pref.withIcons,
+ iconId = item.first
) {
selected = if (it) selected.plus(item.first)
else selected.minus(item.first)
@@ -370,20 +367,20 @@ fun StringMultiSelectionPrefDialogUI(
Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp),
- horizontalArrangement = Arrangement.SpaceBetween,
+ horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
- cornerRadius = cornerRadius,
- onClick = {
- openDialogCustom.value = false
- }
+ cornerRadius = cornerRadius,
+ onClick = {
+ openDialogCustom.value = false
+ }
)
DialogPositiveButton(
- cornerRadius = cornerRadius,
- onClick = {
- pref.setValue(selected)
- openDialogCustom.value = false
- }
+ cornerRadius = cornerRadius,
+ onClick = {
+ pref.setValue(selected)
+ openDialogCustom.value = false
+ }
)
}
}
@@ -392,8 +389,8 @@ fun StringMultiSelectionPrefDialogUI(
@Composable
fun ResetCustomIconsDialog(
- pref: DialogPref,
- openDialogCustom: MutableState,
+ pref: DialogPref,
+ openDialogCustom: MutableState,
) {
val context = LocalContext.current
val prefs = Utilities.getOmegaPrefs(context)
@@ -405,21 +402,21 @@ fun ResetCustomIconsDialog(
val cornerRadius by remember { mutableStateOf(radius) }
Card(
- shape = RoundedCornerShape(cornerRadius),
- modifier = Modifier.padding(12.dp),
- elevation = CardDefaults.elevatedCardElevation(8.dp),
- colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
+ shape = RoundedCornerShape(cornerRadius),
+ modifier = Modifier.padding(12.dp),
+ elevation = CardDefaults.elevatedCardElevation(8.dp),
+ colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant)
) {
Column(
- modifier = Modifier.padding(12.dp),
- horizontalAlignment = Alignment.CenterHorizontally,
- verticalArrangement = Arrangement.spacedBy(8.dp)
+ modifier = Modifier.padding(12.dp),
+ horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(text = stringResource(pref.titleId), style = MaterialTheme.typography.titleLarge)
Spacer(modifier = Modifier.height(16.dp))
Text(
- text = stringResource(R.string.reset_custom_icons_confirmation),
- style = MaterialTheme.typography.titleMedium
+ text = stringResource(R.string.reset_custom_icons_confirmation),
+ style = MaterialTheme.typography.titleMedium
)
Spacer(modifier = Modifier.height(16.dp))
@@ -427,23 +424,23 @@ fun ResetCustomIconsDialog(
Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp),
- horizontalArrangement = Arrangement.SpaceBetween,
+ horizontalArrangement = Arrangement.SpaceBetween,
) {
DialogNegativeButton(
- cornerRadius = cornerRadius,
- onClick = {
- openDialogCustom.value = false
- }
+ cornerRadius = cornerRadius,
+ onClick = {
+ openDialogCustom.value = false
+ }
)
DialogPositiveButton(
- cornerRadius = cornerRadius,
- onClick = {
- val overrideRepo = IconOverrideRepository.INSTANCE.get(context)
- MainScope().launch {
- overrideRepo.deleteAll()
+ cornerRadius = cornerRadius,
+ onClick = {
+ val overrideRepo = IconOverrideRepository.INSTANCE.get(context)
+ MainScope().launch {
+ overrideRepo.deleteAll()
+ }
+ openDialogCustom.value = false
}
- openDialogCustom.value = false
- }
)
}
}
From 54cc87691326b5fcc3b42a2c5639b21b3e2c6b1c Mon Sep 17 00:00:00 2001
From: Saul Henriquez
Date: Sun, 3 Dec 2023 13:40:21 -0600
Subject: [PATCH 14/14] improve dialog buttons
Signed-off-by: Saul Henriquez
---
.../saggitt/omega/compose/components/DialogButton.kt | 11 +++++++----
.../com/saggitt/omega/compose/components/ListItem.kt | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Omega/src/com/saggitt/omega/compose/components/DialogButton.kt b/Omega/src/com/saggitt/omega/compose/components/DialogButton.kt
index d1b89a2a9d..a672be7f05 100644
--- a/Omega/src/com/saggitt/omega/compose/components/DialogButton.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/DialogButton.kt
@@ -18,10 +18,12 @@
package com.saggitt.omega.compose.components
+import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
@@ -38,14 +40,15 @@ fun DialogPositiveButton(
textId: Int = android.R.string.ok,
onClick: () -> Unit = {},
) {
- TextButton(
+ OutlinedButton(
shape = RoundedCornerShape(cornerRadius),
onClick = onClick,
modifier = modifier,
- colors = ButtonDefaults.buttonColors(
- containerColor = MaterialTheme.colorScheme.primary,
+ colors = ButtonDefaults.outlinedButtonColors(
+ containerColor = MaterialTheme.colorScheme.primary.copy(alpha = 0.35F),
contentColor = MaterialTheme.colorScheme.onPrimary
- )
+ ),
+ border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary.copy(alpha = 0.65F))
) {
Text(
text = stringResource(id = textId),
diff --git a/Omega/src/com/saggitt/omega/compose/components/ListItem.kt b/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
index 8177c3f6af..b063d3a90c 100644
--- a/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
+++ b/Omega/src/com/saggitt/omega/compose/components/ListItem.kt
@@ -57,6 +57,7 @@ fun SingleSelectionListItem(
Row(
modifier = modifier
.fillMaxWidth()
+ .height(48.dp)
.clickable(onClick = onClick, enabled = isEnabled),
verticalAlignment = Alignment.CenterVertically
) {
@@ -80,7 +81,6 @@ fun SingleSelectionListItem(
if (endWidget != null) {
Spacer(modifier = Modifier.width(8.dp))
endWidget()
- Spacer(modifier = Modifier.width(8.dp))
}
}
}