cardGapExpandedPx/cardGapCollapsedPx/rowPaddingPx/horizontalPaddingPx
移入 remember,每帧只做一次浮点插值而非完整 density 转换。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
monthScale/yearScale/targetAlpha 从 composable body 移入 graphicsLayer lambda,
state 读取只触发 draw-phase redraw 而非重组。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Each month in the 4x3 year grid now shows a compact calendar with
day numbers, matching the iOS Calendar year view style. Today is
highlighted with a filled circle. Selected month title uses primary color.
- CalendarViewModel: year view state and animation methods
- CalendarMonthView: graphicsLayer zoom overlay, BottomCard hiding
- MonthHeader: toggle year view on click, "今天" button
Sync CalendarPager's pagerState to selectedDate in CalendarMonthView
via LaunchedEffect(selectedDate), so the page is already correct when
CalendarPager re-enters composition during expand. Remove the now-
redundant LaunchedEffect(Unit) sync in CalendarPager.
Apply consistent formatting: import ordering, line wrapping,
indentation, and XML normalization. No functional changes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The fixed DRAG_RANGE_DP=200dp caused the collapse progress to advance faster
than the visual height change, making the calendar feel like it "outruns" the
finger. Now dragRangePx is computed as (weeks-1)×rowHeight, matching the
actual visual height delta during collapse so finger movement maps 1:1 to
visual change.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move padding after onSizeChanged in CalendarMonthPage so row height
measurement excludes padding. Rename p→collapseProgress for clarity.
Add comments explaining grid height calculation and pager switching.
Increase ROW_PADDING_DP from 4 to 6.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Card gap now interpolates between 24dp (expanded) and 12dp (collapsed)
instead of using a fixed value, providing a smoother visual transition.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Include CARD_GAP_DP in calendar area height calculation so BottomCard
positioning accounts for the gap. Add horizontal padding to MonthHeader
for better visual alignment.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>
gridHeightPx changed from derivedStateOf to direct computation because
derivedStateOf cannot track non-State local variable changes, causing
gridHeightPx to not update when rowHeightPx transitions from 0 to measured value.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move shared constants and helper functions into CalendarUtils.kt,
replace manual state synchronization with derivedStateOf in
CalendarViewModel and UI composables.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove unused currentWeeksCount variable and onWeeksChanged callback
- Replace deprecated monthNumber with month.number (requires explicit import)
- Remove all @Suppress("DEPRECATION") annotations for monthNumber
- Convert double comparison to range check (today in weekMonday..weekSunday)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace hardcoded padding values with constants, use Spacer instead of
space character for spacing, remove fontSize override on bodySmall, and
fix WeekdayHeader modifier order (padding before onSizeChanged).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>