Keep diff choices readable at large text sizes

This commit is contained in:
2026-11-11 21:08:54 +00:00
parent db522c8dc9
commit 66cb9edee1
3 changed files with 17 additions and 0 deletions
@@ -80,6 +80,9 @@ Widget diffFormMenu(
for (final entry in diffFormLabels.entries)
AppChoiceMenuItem(
selected: entry.key == form,
// At accessibility text sizes the check mark otherwise leaves
// too little room for the longest label in the phone sheet.
contentPadding: EdgeInsets.zero,
onTap: () {
Navigator.of(sheetContext).pop();
onChanged(entry.key);
+3
View File
@@ -65,16 +65,19 @@ class AppChoiceMenuItem extends StatelessWidget {
required this.child,
required this.selected,
required this.onTap,
this.contentPadding,
});
final Widget child;
final bool selected;
final VoidCallback? onTap;
final EdgeInsetsGeometry? contentPadding;
@override
Widget build(BuildContext context) => ListTile(
enabled: onTap != null,
title: child,
contentPadding: contentPadding,
trailing: selected
? Icon(Icons.check, color: Theme.of(context).colorScheme.primary)
: null,
+11
View File
@@ -14,3 +14,14 @@
- `tool/analyze.sh`: clean.
- No rendered capture was performed; these changes remove alternate metadata and
branches without changing Material layout or visual behavior.
## Land-gate regression follow-up
- Fixed the narrow 2x-text diff-form bottom sheet: its selected check mark no
longer reduces the `Rendered` title below the width of the whole word.
- Added optional `contentPadding` to the shared Material `AppChoiceMenuItem`;
only the diff-form menu uses zero padding for this constrained case.
- Focused watchdog: 16 passed, 0 failed in
`test/features/changes/diff_presentation_test.dart` and
`test/ui/adaptive/app_popups_test.dart`.
- `tool/analyze.sh`: clean.