From f01a312c235e23eac4d02c7a5f701a42e72069b1 Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 13 Jul 2023 17:38:15 -0400 Subject: [PATCH] Prevent keyboard when using SelectItem in filters Closes #9703 --- .../tachiyomi/presentation/core/components/SettingsItems.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt index d0442ae54..d5ce4a5d2 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/SettingsItems.kt @@ -207,6 +207,7 @@ fun SelectItem( label = { Text(text = label) }, value = options[selectedIndex].toString(), onValueChange = {}, + enabled = false, readOnly = true, singleLine = true, trailingIcon = { @@ -214,7 +215,9 @@ fun SelectItem( expanded = expanded, ) }, - colors = ExposedDropdownMenuDefaults.textFieldColors(), + colors = ExposedDropdownMenuDefaults.textFieldColors( + disabledTextColor = MaterialTheme.colorScheme.onSurface, + ), ) ExposedDropdownMenu( @@ -229,6 +232,7 @@ fun SelectItem( onSelect(index) expanded = false }, + contentPadding = ExposedDropdownMenuDefaults.ItemContentPadding, ) } }