saket / cascade

Nested popup menus with smooth height animations for Android
https://saket.github.io/cascade
Apache License 2.0
2.02k stars 67 forks source link

The default color of the CascadeDropdownMenu is not the same as DropdownMenu #39

Closed MV-GH closed 1 year ago

MV-GH commented 1 year ago

Before: image

after: image

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
saket commented 1 year ago

Fixed by https://github.com/saket/cascade/commit/07fa1de4239822923574d30a304a13fb84248a98