fix: 长按菜单触发器形状
This commit is contained in:
parent
e7994c6889
commit
6f0e82f0ef
|
|
@ -113,7 +113,7 @@ fun LongClickMenu(
|
||||||
enabled: Boolean = true,
|
enabled: Boolean = true,
|
||||||
menuState: MenuState = rememberMenuState(),
|
menuState: MenuState = rememberMenuState(),
|
||||||
onClick: (() -> Unit)? = null,
|
onClick: (() -> Unit)? = null,
|
||||||
shape: Shape = RoundedCornerShape(14.dp),
|
shape: Shape = RoundedCornerShape(0.dp),
|
||||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||||
indication: Indication? = LocalIndication.current,
|
indication: Indication? = LocalIndication.current,
|
||||||
content: @Composable () -> Unit,
|
content: @Composable () -> Unit,
|
||||||
|
|
@ -129,6 +129,7 @@ fun LongClickMenu(
|
||||||
}
|
}
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
|
.clip(shape)
|
||||||
.combinedClickable(
|
.combinedClickable(
|
||||||
interactionSource = interactionSource,
|
interactionSource = interactionSource,
|
||||||
indication = indication,
|
indication = indication,
|
||||||
|
|
@ -153,9 +154,7 @@ fun LongClickMenu(
|
||||||
DropdownMenu(
|
DropdownMenu(
|
||||||
expanded = menuState.expanded,
|
expanded = menuState.expanded,
|
||||||
onDismissRequest = { menuState.expanded = false },
|
onDismissRequest = { menuState.expanded = false },
|
||||||
modifier = Modifier
|
modifier = Modifier.background(color = ExtendedTheme.colors.menuBackground)
|
||||||
.clip(shape)
|
|
||||||
.background(color = ExtendedTheme.colors.menuBackground)
|
|
||||||
) {
|
) {
|
||||||
ProvideContentColor(color = ExtendedTheme.colors.text) {
|
ProvideContentColor(color = ExtendedTheme.colors.text) {
|
||||||
menuContent()
|
menuContent()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue