Closed MV-GH closed 1 year ago
Before:
after:
Showing a default DropdownMenu vs CascadeDropdownMenu
https://github.com/saket/cascade/assets/67873169/4008fd78-c6d5-42e7-9202-a39f8f033dcd
I am also not sure how not to change the default color with CascadeDropdownMenu
Fixed by https://github.com/saket/cascade/commit/07fa1de4239822923574d30a304a13fb84248a98
Before:
after:
Showing a default DropdownMenu vs CascadeDropdownMenu
https://github.com/saket/cascade/assets/67873169/4008fd78-c6d5-42e7-9202-a39f8f033dcd
I am also not sure how not to change the default color with CascadeDropdownMenu
code in question
```kotlin CascadeDropdownMenu( expanded = expanded, onDismissRequest = onDismissRequest, modifier = Modifier.semantics { testTagsAsResourceId = true }, ) { DropdownMenuItem( text = { Text(text = stringResource(R.string.home_refresh)) }, leadingIcon = { Icon(Icons.Outlined.Refresh, contentDescription = null) }, onClick = { onDismissRequest() onClickRefresh() }, modifier = Modifier.testTag("jerboa:refresh"), ) DropdownMenuItem( text = { Text(text = stringResource(R.string.home_post_view_mode)) }, leadingIcon = { Icon(Icons.Outlined.ViewAgenda, contentDescription = null) }, children = { PostViewMode.entries.map { DropdownMenuItem( text = { Text(text = stringResource(it.mode)) }, onClick = { onClickPostViewMode(it) onDismissRequest() }, modifier = if (selectedPostViewMode == it) { Modifier.background(MaterialTheme.colorScheme.onBackground.copy(alpha = .1f)) } else { Modifier }.testTag("jerboa:postviewmode_${it.name}"), ) } }, modifier = Modifier.testTag("jerboa:postviewmode"), ) DropdownMenuItem( text = { Text(stringResource(R.string.home_site_info)) }, leadingIcon = { Icon(Icons.Outlined.Info, contentDescription = null) }, onClick = { onClickSiteInfo() onDismissRequest() }, ) ``` Old version https://github.com/MV-GH/jerboa/blob/a5d1b01a6b219ad524d5d97e897e6514058646d5/app/src/main/java/com/jerboa/ui/components/home/Home.kt#L230