fix(todo): the calendar's arrows stay put at the left

The month's Flexible and the Spacer shared what was left of the row, so
the arrows sat somewhere in the middle and moved as the way back to
today showed. They come first now, where nothing beside them moves them.

Whats-New: The calendar's arrows in Upcoming stay in one place at the left.
Whats-New-De: Die Pfeile im Kalender unter Demnächst bleiben links an ihrem Platz.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-05 19:07:08 +01:00
commit 8628d80d89
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -152,33 +152,10 @@ class _HourGridState() extends State<HourGrid> {
if (several)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
// The arrows first, where neither the month's length nor the way
// back to today can move them.
child: Row(
children: [
Flexible(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Text(
DateFormat.yMMMM(locale).format(start.toDate()),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium,
),
),
),
if (start != today)
IconButton(
tooltip: l10n.weekToday,
icon: const Icon(LucideIcons.calendar1),
color: theme.colorScheme.primary,
onPressed: () => _go(today),
),
const Spacer(),
if (overdue.isNotEmpty)
TextButton(
key: HourGrid.overdueKey,
onPressed: () => _showOverdue(context),
child: Text(l10n.overdue),
),
IconButton(
tooltip: l10n.daysPrevious,
icon: const Icon(LucideIcons.chevronLeft),
@ -191,6 +168,36 @@ class _HourGridState() extends State<HourGrid> {
icon: const Icon(LucideIcons.chevronRight),
onPressed: () => _go(start.plus(count)),
),
Expanded(
child: Row(
children: [
Flexible(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Text(
DateFormat.yMMMM(locale).format(start.toDate()),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium,
),
),
),
if (start != today)
IconButton(
tooltip: l10n.weekToday,
icon: const Icon(LucideIcons.calendar1),
color: theme.colorScheme.primary,
onPressed: () => _go(today),
),
],
),
),
if (overdue.isNotEmpty)
TextButton(
key: HourGrid.overdueKey,
onPressed: () => _showOverdue(context),
child: Text(l10n.overdue),
),
],
),
),