Do not change bg color of DropdownMenu for dark theme

This commit is contained in:
Benoit Marty 2023-06-29 09:48:15 +02:00 committed by Benoit Marty
parent d5faa35977
commit d1f8e64fa1

View file

@ -38,11 +38,16 @@ fun DropdownMenu(
properties: PopupProperties = PopupProperties(focusable = true),
content: @Composable ColumnScope.() -> Unit
) {
val bgColor = if (ElementTheme.isLightTheme) {
ElementTheme.materialColors.background
} else {
ElementTheme.colors.bgSubtlePrimary
}
androidx.compose.material3.DropdownMenu(
expanded = expanded,
onDismissRequest = onDismissRequest,
modifier = modifier
.background(color = ElementTheme.materialColors.background)
.background(color = bgColor)
.widthIn(min = minMenuWidth),
offset = offset,
properties = properties,