fix: 长按菜单触发器形状

This commit is contained in:
HuanCheng65 2023-09-30 20:23:13 +08:00
parent e7994c6889
commit 6f0e82f0ef
No known key found for this signature in database
GPG Key ID: 5EC9DD60A32C7360
1 changed files with 3 additions and 4 deletions

View File

@ -113,7 +113,7 @@ fun LongClickMenu(
enabled: Boolean = true,
menuState: MenuState = rememberMenuState(),
onClick: (() -> Unit)? = null,
shape: Shape = RoundedCornerShape(14.dp),
shape: Shape = RoundedCornerShape(0.dp),
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
indication: Indication? = LocalIndication.current,
content: @Composable () -> Unit,
@ -129,6 +129,7 @@ fun LongClickMenu(
}
Box(
modifier = modifier
.clip(shape)
.combinedClickable(
interactionSource = interactionSource,
indication = indication,
@ -153,9 +154,7 @@ fun LongClickMenu(
DropdownMenu(
expanded = menuState.expanded,
onDismissRequest = { menuState.expanded = false },
modifier = Modifier
.clip(shape)
.background(color = ExtendedTheme.colors.menuBackground)
modifier = Modifier.background(color = ExtendedTheme.colors.menuBackground)
) {
ProvideContentColor(color = ExtendedTheme.colors.text) {
menuContent()