Fix calendar height jitter when collapsing to week view
WeekPager had no height constraint (unlike CalendarPager which uses pagerModifier with gridHeightPx), causing the pager to freely expand instead of staying at the computed single-row height. Also, WeekPager used 2dp row padding while CalendarMonthPage uses ROW_PADDING_DP (4dp), creating a height mismatch at the switch point. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
f189c188c7
commit
c8921e8641
@ -147,7 +147,8 @@ fun CalendarMonthView(
|
||||
val weekSunday = weekMonday.plus(DatePeriod(days = 6))
|
||||
val date = if (today in weekMonday..weekSunday) today else weekMonday
|
||||
viewModel.selectDate(date)
|
||||
}
|
||||
},
|
||||
modifier = pagerModifier
|
||||
)
|
||||
} else {
|
||||
CalendarPager(
|
||||
|
||||
@ -57,7 +57,7 @@ fun WeekPager(
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 2.dp)
|
||||
.padding(vertical = ROW_PADDING_DP.dp)
|
||||
) {
|
||||
(0 until 7).forEach { dayOffset ->
|
||||
val date = weekMonday.plus(DatePeriod(days = dayOffset))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user