fixed timetable ruler and day header overflowing at large system text sizes

Both have fixed geometry, so their text scaling is capped at 1.3. Ruler
times shrink instead of wrapping into the period number and are only
shown when they fit at the current scale.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-28 12:51:28 +02:00
co-authored by Claude Opus 5.5
parent 38a651f916
commit b413fe05de
2 changed files with 59 additions and 33 deletions
@@ -13,17 +13,19 @@ class _DayHeaderStrip extends StatelessWidget {
});
@override
Widget build(BuildContext context) => Row(
children: [
SizedBox(width: rulerWidth),
for (var d = 0; d < 5; d++)
Expanded(
child: _DayHeaderCell(
date: weekStart.addDays(d),
today: today,
// Fixed-height strip with a 28px day circle: unclamped accessibility
// sizes overflow it.
Widget build(BuildContext context) => MediaQuery.withClampedTextScaling(
maxScaleFactor: 1.3,
child: Row(
children: [
SizedBox(width: rulerWidth),
for (var d = 0; d < 5; d++)
Expanded(
child: _DayHeaderCell(date: weekStart.addDays(d), today: today),
),
),
],
],
),
);
}