FAB 固定在屏幕左下角,不再跟随 BottomCard 高度

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
xfy 2026-05-18 13:29:25 +08:00
parent 02730e54e8
commit 62924eff3e

View File

@ -375,20 +375,15 @@ fun CalendarMonthView(
} }
// FAB 浮动按钮 // FAB 浮动按钮
if (cardHeightPx > 0) { FloatingActionButton(
FloatingActionButton( onClick = { isMenuExpanded = !isMenuExpanded },
onClick = { isMenuExpanded = !isMenuExpanded }, modifier = Modifier
modifier = Modifier .align(Alignment.BottomStart)
.align(Alignment.BottomStart) .padding(start = 24.dp, bottom = 32.dp),
.padding( containerColor = MaterialTheme.colorScheme.primaryContainer,
start = 16.dp, contentColor = MaterialTheme.colorScheme.onPrimaryContainer
bottom = with(density) { cardHeightPx.toDp() } + 16.dp ) {
), MenuIcon()
containerColor = MaterialTheme.colorScheme.primaryContainer,
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
) {
MenuIcon()
}
} }
// Scrim菜单展开时覆盖全屏点击关闭 // Scrim菜单展开时覆盖全屏点击关闭
@ -422,10 +417,7 @@ fun CalendarMonthView(
) + fadeOut(tween(100)), ) + fadeOut(tween(100)),
modifier = Modifier modifier = Modifier
.align(Alignment.BottomStart) .align(Alignment.BottomStart)
.padding( .padding(start = 24.dp, bottom = 32.dp + 56.dp + 8.dp)
start = 16.dp,
bottom = with(density) { cardHeightPx.toDp() } + 16.dp + 56.dp + 8.dp
)
) { ) {
Card( Card(
shape = RoundedCornerShape(12.dp), shape = RoundedCornerShape(12.dp),