refactor(accessibility): improve patch options (#1369)

Co-authored-by: Palm <palmpasuthorn@gmail.com>
This commit is contained in:
Pun Butrach 2023-10-16 16:47:59 +07:00 committed by GitHub
parent b355778a92
commit ccc6be1e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,7 @@
{
"okButton": "OK",
"cancelButton": "Cancel",
"dismissButton": "Dismiss",
"quitButton": "Quit",
"updateButton": "Update",
"enabledLabel": "Enabled",
@ -134,6 +135,7 @@
"setRequiredOption": "Some patches require options to be set:\n\n{patches}\n\nPlease set them before continuing."
},
"patchOptionsView": {
"resetOptionsTooltip": "Reset patch options",
"viewTitle": "Patch options",
"saveOptions": "Save",

View File

@ -48,6 +48,10 @@ class PatchOptionsView extends StatelessWidget {
icon: const Icon(
Icons.history,
),
tooltip: FlutterI18n.translate(
context,
'patchOptionsView.resetOptionsTooltip',
),
),
],
),

View File

@ -147,7 +147,7 @@ class PatchOptionsViewModel extends BaseViewModel {
),
actions: [
CustomMaterialButton(
label: I18nText('okButton'),
label: I18nText('cancelButton'),
onPressed: () {
Navigator.of(context).pop();
},
@ -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);
@ -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,
),
)
),
],
),
),