FAB 固定在屏幕左下角,不再跟随 BottomCard 高度
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
02730e54e8
commit
62924eff3e
@ -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),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user