Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(Accessibility): improve patch options #1369

Merged
merged 5 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions assets/i18n/en_US.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"okButton": "OK",
"cancelButton": "Cancel",
"dismissButton": "Dismiss",
PalmDevs marked this conversation as resolved.
Show resolved Hide resolved
"quitButton": "Quit",
"updateButton": "Update",
"enabledLabel": "Enabled",
Expand Down Expand Up @@ -136,6 +137,7 @@
"selectAllPatchesWarningContent": "You are about to select all patches, that includes non-suggested patches and can cause unwanted behavior."
},
"patchOptionsView": {
"resetOptionsTooltip": "Reset patch options",
"viewTitle": "Patch options",
"saveOptions": "Save",

Expand Down
4 changes: 4 additions & 0 deletions lib/ui/views/patch_options/patch_options_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class PatchOptionsView extends StatelessWidget {
icon: const Icon(
Icons.history,
),
tooltip: FlutterI18n.translate(
context,
'patchOptionsView.resetOptionsTooltip',
),
),
],
),
Expand Down
8 changes: 4 additions & 4 deletions lib/ui/views/patch_options/patch_options_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class PatchOptionsViewModel extends BaseViewModel {
),
actions: [
CustomMaterialButton(
label: I18nText('okButton'),
label: I18nText('cancelButton'),
onPressed: () {
Navigator.of(context).pop();
},
Expand All @@ -165,7 +165,7 @@ class PatchOptionsViewModel extends BaseViewModel {
.map((e) {
return CustomCard(
padding: const EdgeInsets.all(4),
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
backgroundColor: Theme.of(context).colorScheme.surface,
onTap: () {
addOption(e);
Navigator.pop(context);
Expand All @@ -186,9 +186,9 @@ class PatchOptionsViewModel extends BaseViewModel {
e.description,
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.onSecondaryContainer,
color: Theme.of(context).colorScheme.onSurface,
),
)
),
],
),
),
Expand Down