Closed MV-GH closed 1 year ago
Can you regenerate test screenshots using and add them to this PR?
./gradlew cascade-compose:connectedDebugAndroidTest -Pdropshots.record
I generated them using a Pixel 7 API 31.
Made some small changes, I saw that it was setting the shadowElevation to the tonalElevation. And made a argument for tonalElevation
There was a test with this remark
// Drop shadows are strangely causing tiny differences in // generated screenshots. A zero elevation is used to avoid this. private val shadowElevation = 0.dp
This was actually changing the tonalElevation and now it actually changes the shadowElevation
Not sure if this is still needed?
I'm sorry this took me some time. trunk
has moved ahead so let me land your changes manually.
According to the m3 specs, dropdown has a 3dp tonal elevation, this was missing and caused the discrepancy between DropdownMenu and CascadeDropdownMenu. See https://m3.material.io/styles/elevation/tokens#df721a00-888e-4c5e-bfe1-5d905f167aaa
After:
https://github.com/saket/cascade/assets/67873169/4d59acd9-4159-4c2a-834e-d3bdc0d9d5e8
Before:
https://github.com/saket/cascade/assets/67873169/4008fd78-c6d5-42e7-9202-a39f8f033dcd
Fixes #39