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