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:
@@ -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),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user