minor
This commit is contained in:
parent
a575fec524
commit
ed250f9ccf
6 changed files with 12 additions and 8 deletions
|
@ -11,6 +11,8 @@ class Themes {
|
|||
fontFeatures: [FontFeature.enable('smcp')],
|
||||
);
|
||||
|
||||
static String asButtonLabel(String s) => s.toUpperCase();
|
||||
|
||||
static TextStyle searchFieldStyle(BuildContext context) => Theme.of(context).textTheme.bodyLarge!;
|
||||
|
||||
static Color overlayBackgroundColor({
|
||||
|
|
|
@ -18,6 +18,7 @@ import 'package:aves/services/common/services.dart';
|
|||
import 'package:aves/services/media/enums.dart';
|
||||
import 'package:aves/services/media/media_edit_service.dart';
|
||||
import 'package:aves/theme/durations.dart';
|
||||
import 'package:aves/theme/themes.dart';
|
||||
import 'package:aves/utils/android_file_utils.dart';
|
||||
import 'package:aves/widgets/collection/collection_page.dart';
|
||||
import 'package:aves/widgets/collection/entry_set_action_delegate.dart';
|
||||
|
@ -250,8 +251,7 @@ mixin EntryStorageMixin on FeedbackMixin, PermissionAwareMixin, SizeAwareMixin {
|
|||
if (toBin) {
|
||||
if (movedEntries.isNotEmpty) {
|
||||
action = SnackBarAction(
|
||||
// TODO TLAD [l10n] key for "RESTORE"
|
||||
label: l10n.entryActionRestore.toUpperCase(),
|
||||
label: Themes.asButtonLabel(l10n.entryActionRestore),
|
||||
onPressed: () {
|
||||
if (navigator != null) {
|
||||
doMove(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:aves/model/entry/entry.dart';
|
||||
import 'package:aves/model/entry/extensions/props.dart';
|
||||
import 'package:aves/services/common/services.dart';
|
||||
import 'package:aves/theme/themes.dart';
|
||||
import 'package:aves/utils/android_file_utils.dart';
|
||||
import 'package:aves/view/view.dart';
|
||||
import 'package:aves/widgets/common/extensions/build_context.dart';
|
||||
|
@ -61,7 +62,7 @@ mixin PermissionAwareMixin {
|
|||
TextButton(
|
||||
onPressed: () => Navigator.maybeOf(context)?.pop(true),
|
||||
// MD2 button labels were upper case but they are lower case in MD3
|
||||
child: Text(MaterialLocalizations.of(context).okButtonLabel.toUpperCase()),
|
||||
child: Text(Themes.asButtonLabel(MaterialLocalizations.of(context).okButtonLabel)),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:aves/model/settings/settings.dart';
|
||||
import 'package:aves/theme/themes.dart';
|
||||
import 'package:aves/widgets/common/extensions/build_context.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
@ -165,7 +166,7 @@ class CancelButton extends StatelessWidget {
|
|||
return TextButton(
|
||||
onPressed: () => Navigator.maybeOf(context)?.pop(),
|
||||
// MD2 button labels were upper case but they are lower case in MD3
|
||||
child: Text(MaterialLocalizations.of(context).cancelButtonLabel.toUpperCase()),
|
||||
child: Text(Themes.asButtonLabel(context.l10n.cancelTooltip)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +179,7 @@ class OkButton extends StatelessWidget {
|
|||
return TextButton(
|
||||
onPressed: () => Navigator.maybeOf(context)?.pop(),
|
||||
// MD2 button labels were upper case but they are lower case in MD3
|
||||
child: Text(MaterialLocalizations.of(context).okButtonLabel.toUpperCase()),
|
||||
child: Text(Themes.asButtonLabel(MaterialLocalizations.of(context).okButtonLabel)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ class _EditEntryDateDialogState extends State<EditEntryDateDialog> {
|
|||
initialDate: _customDateTime,
|
||||
firstDate: DateTime(0),
|
||||
lastDate: DateTime(2100),
|
||||
cancelText: MaterialLocalizations.of(context).cancelButtonLabel.toUpperCase(),
|
||||
cancelText: Themes.asButtonLabel(context.l10n.cancelTooltip),
|
||||
confirmText: context.l10n.nextButtonLabel,
|
||||
);
|
||||
if (_date == null) return;
|
||||
|
@ -309,7 +309,7 @@ class _EditEntryDateDialogState extends State<EditEntryDateDialog> {
|
|||
final _time = await showTimePicker(
|
||||
context: context,
|
||||
initialTime: TimeOfDay.fromDateTime(_customDateTime),
|
||||
cancelText: MaterialLocalizations.of(context).cancelButtonLabel.toUpperCase(),
|
||||
cancelText: Themes.asButtonLabel(context.l10n.cancelTooltip),
|
||||
);
|
||||
if (_time == null) return;
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class _TagEditorPageState extends State<TagEditorPage> {
|
|||
const CancelButton(),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.maybeOf(context)?.pop(true),
|
||||
child: Text(MaterialLocalizations.of(context).okButtonLabel.toUpperCase()),
|
||||
child: Text(Themes.asButtonLabel(MaterialLocalizations.of(context).okButtonLabel)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue