From ff9d3ce4a8480f41db610b7bfe3fad0dd3c93bc2 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Wed, 21 Oct 2026 22:06:39 +0100 Subject: [PATCH] fix(app): use native schedule text roles instead of fixed sizes and weights --- .../ui/editor/schedule_editor_fields.dart | 4 ++-- .../schedules/ui/list/schedule_list_row.dart | 20 +++++++------------ .../ui/list/schedule_list_toolbar.dart | 3 +-- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/app/lib/features/schedules/ui/editor/schedule_editor_fields.dart b/app/lib/features/schedules/ui/editor/schedule_editor_fields.dart index 044a98e3..f33476b7 100644 --- a/app/lib/features/schedules/ui/editor/schedule_editor_fields.dart +++ b/app/lib/features/schedules/ui/editor/schedule_editor_fields.dart @@ -6,8 +6,8 @@ import '../../../../ui/adaptive/host.dart'; /// Secondary text under a field, using the host's own colours and text theme. TextStyle scheduleEditorSecondaryStyle(BuildContext context) { if (usesCupertinoHost(context)) { - return CupertinoTheme.of(context).textTheme.textStyle.copyWith( - fontSize: 14, + // The host's own secondary-label style; no invented point size. + return CupertinoTheme.of(context).textTheme.tabLabelTextStyle.copyWith( color: CupertinoColors.secondaryLabel.resolveFrom(context), ); } diff --git a/app/lib/features/schedules/ui/list/schedule_list_row.dart b/app/lib/features/schedules/ui/list/schedule_list_row.dart index 010bf53b..110fb2f9 100644 --- a/app/lib/features/schedules/ui/list/schedule_list_row.dart +++ b/app/lib/features/schedules/ui/list/schedule_list_row.dart @@ -80,28 +80,22 @@ class ScheduleListRow extends StatelessWidget { Text(value, style: _metaStyle(context)); TextStyle? _titleStyle(BuildContext context) => cupertino - ? CupertinoTheme.of( - context, - ).textTheme.textStyle.copyWith(fontWeight: FontWeight.w600) - : Theme.of( - context, - ).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600); + ? CupertinoTheme.of(context).textTheme.navTitleTextStyle + : Theme.of(context).textTheme.titleMedium; TextStyle? _bodyStyle(BuildContext context) => cupertino ? CupertinoTheme.of(context).textTheme.textStyle : null; TextStyle? _metaStyle(BuildContext context) => cupertino - ? CupertinoTheme.of(context).textTheme.textStyle.copyWith( - fontSize: 14, - color: _secondaryColor(context), - ) + ? CupertinoTheme.of( + context, + ).textTheme.tabLabelTextStyle.copyWith(color: _secondaryColor(context)) : Theme.of( context, ).textTheme.bodySmall?.copyWith(color: _secondaryColor(context)); - TextStyle? _statusStyle(BuildContext context) => _metaStyle( - context, - )?.copyWith(color: _statusColor(context), fontWeight: FontWeight.w600); + TextStyle? _statusStyle(BuildContext context) => + _metaStyle(context)?.copyWith(color: _statusColor(context)); Color _secondaryColor(BuildContext context) => cupertino ? CupertinoColors.secondaryLabel.resolveFrom(context) diff --git a/app/lib/features/schedules/ui/list/schedule_list_toolbar.dart b/app/lib/features/schedules/ui/list/schedule_list_toolbar.dart index 374c7424..4e01c4fb 100644 --- a/app/lib/features/schedules/ui/list/schedule_list_toolbar.dart +++ b/app/lib/features/schedules/ui/list/schedule_list_toolbar.dart @@ -169,8 +169,7 @@ class ScheduleListToolbar extends StatelessWidget { } TextStyle? _metaStyle(BuildContext context) => cupertino - ? CupertinoTheme.of(context).textTheme.textStyle.copyWith( - fontSize: 14, + ? CupertinoTheme.of(context).textTheme.tabLabelTextStyle.copyWith( color: CupertinoColors.secondaryLabel.resolveFrom(context), ) : Theme.of(context).textTheme.bodySmall?.copyWith(