mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-08 19:44:25 +08:00
refactor: no need propagate content color in DropdownMenuItem
This commit is contained in:
@@ -177,7 +177,9 @@ fun DropdownMenuItem(
|
|||||||
style = currentStyle,
|
style = currentStyle,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
CompositionLocalProvider(LocalTextStyle provides LocalTextStyle.current.default(currentColor)) {
|
// Note: Since this is a popup menu, we don't want to propagate the content color.
|
||||||
|
// So here we use copy NOT default.
|
||||||
|
CompositionLocalProvider(LocalTextStyle provides LocalTextStyle.current.copy(color = currentColor)) {
|
||||||
content()
|
content()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user