diff --git a/app/src/main/kotlin/org/cru/godtools/ui/dashboard/common/Dropdowns.kt b/app/src/main/kotlin/org/cru/godtools/ui/dashboard/common/Dropdowns.kt new file mode 100644 index 0000000000..7befa5812c --- /dev/null +++ b/app/src/main/kotlin/org/cru/godtools/ui/dashboard/common/Dropdowns.kt @@ -0,0 +1,14 @@ +package org.cru.godtools.ui.dashboard.common + +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import org.cru.godtools.base.ui.theme.GodToolsTheme + +internal val dropdownButtonColors @Composable get() = ButtonDefaults.elevatedButtonColors( + containerColor = when { + GodToolsTheme.isLightColorSchemeActive -> MaterialTheme.colorScheme.background + else -> Color.Unspecified + } +) diff --git a/app/src/main/kotlin/org/cru/godtools/ui/dashboard/tools/ToolFilters.kt b/app/src/main/kotlin/org/cru/godtools/ui/dashboard/tools/ToolFilters.kt index e03bbb12a2..860f92fc1d 100644 --- a/app/src/main/kotlin/org/cru/godtools/ui/dashboard/tools/ToolFilters.kt +++ b/app/src/main/kotlin/org/cru/godtools/ui/dashboard/tools/ToolFilters.kt @@ -50,6 +50,7 @@ import org.cru.godtools.R import org.cru.godtools.base.LocalAppLanguage import org.cru.godtools.base.ui.theme.GodToolsTheme import org.cru.godtools.base.ui.util.getToolCategoryName +import org.cru.godtools.ui.dashboard.common.dropdownButtonColors import org.cru.godtools.ui.languages.LanguageName import org.jetbrains.annotations.VisibleForTesting @@ -91,6 +92,7 @@ internal fun CategoryFilter(filters: ToolsScreen.Filters, modifier: Modifier = M ElevatedButton( onClick = { expanded = !expanded }, + colors = dropdownButtonColors, modifier = modifier.semantics { role = Role.DropdownList } ) { Text( @@ -149,6 +151,7 @@ internal fun LanguageFilter(filters: ToolsScreen.Filters, modifier: Modifier = M ElevatedButton( onClick = { eventSink(ToolsScreen.FiltersEvent.ToggleLanguagesMenu) }, + colors = dropdownButtonColors, modifier = modifier.semantics { role = Role.DropdownList } ) { Text(