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

Fix dialog background colors #963

Merged
merged 2 commits into from
Jan 2, 2025
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
7 changes: 7 additions & 0 deletions lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@
context: this.context,
barrierDismissible: false,
builder: (context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;

Check warning on line 138 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L138

Added line #L138 was not covered by tests

return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,

Check warning on line 142 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L141-L142

Added lines #L141 - L142 were not covered by tests
title: const Text('New Field Image Available'),
content: const SizedBox(
width: 400,
Expand Down Expand Up @@ -187,7 +191,10 @@
context: this.context,
barrierDismissible: false,
builder: (context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;

Check warning on line 194 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L194

Added line #L194 was not covered by tests
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,

Check warning on line 197 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L196-L197

Added lines #L196 - L197 were not covered by tests
title: const Text('Non-standard Field Mirroring'),
content: const SizedBox(
width: 300,
Expand Down
3 changes: 3 additions & 0 deletions lib/pages/nav_grid_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ class _NavGridPageState extends State<NavGridPage> {
showDialog(
context: this.context,
builder: (context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,
title: const Text('Edit Grid'),
content: SizedBox(
width: 350,
Expand Down
3 changes: 3 additions & 0 deletions lib/pages/project/project_item_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ class _ProjectItemCardState extends State<ProjectItemCard> {
showDialog(
context: context,
builder: (context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,
title: const Text('Delete File'),
content: Text(
'Are you sure you want to delete the file: ${widget.name}? This cannot be undone.\n\nIf this is a path, any autos using it will have their reference to it removed.'),
Expand Down
31 changes: 31 additions & 0 deletions lib/pages/project/project_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,18 @@ class _ProjectPageState extends State<ProjectPage> {
context: context,
builder: (BuildContext
context) {
ColorScheme
colorScheme =
Theme.of(
context)
.colorScheme;
return AlertDialog(
backgroundColor:
colorScheme
.surface,
surfaceTintColor:
colorScheme
.surfaceTint,
title: const Text(
'Unable to Rename'),
content: Text(
Expand Down Expand Up @@ -1052,7 +1063,10 @@ class _ProjectPageState extends State<ProjectPage> {
showDialog(
context: context,
builder: (BuildContext context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,
title: const Text('Unable to Rename'),
content: Text('The file "$newName.path" already exists'),
actions: [
Expand Down Expand Up @@ -1300,7 +1314,18 @@ class _ProjectPageState extends State<ProjectPage> {
context: context,
builder: (BuildContext
context) {
ColorScheme
colorScheme =
Theme.of(
context)
.colorScheme;
return AlertDialog(
backgroundColor:
colorScheme
.surface,
surfaceTintColor:
colorScheme
.surfaceTint,
title: const Text(
'Unable to Rename'),
content: Text(
Expand Down Expand Up @@ -1524,7 +1549,10 @@ class _ProjectPageState extends State<ProjectPage> {
showDialog(
context: this.context,
builder: (context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,
title: const Text('Delete Folder'),
content: SizedBox(
width: 400,
Expand Down Expand Up @@ -1787,7 +1815,10 @@ class _ProjectPageState extends State<ProjectPage> {
showDialog(
context: context,
builder: (BuildContext context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,
title: const Text('Unable to Rename'),
content: Text('The file "$newName.auto" already exists'),
actions: [
Expand Down
9 changes: 9 additions & 0 deletions lib/widgets/app_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@
showDialog(
context: context,
builder: (context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;

Check warning on line 413 in lib/widgets/app_settings.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/app_settings.dart#L413

Added line #L413 was not covered by tests
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,

Check warning on line 416 in lib/widgets/app_settings.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/app_settings.dart#L415-L416

Added lines #L415 - L416 were not covered by tests
title: const Text('Delete Custom Field Image'),
content: Text(
'Are you sure you want to delete the custom field "${_selectedField.name}"? This cannot be undone.'),
Expand Down Expand Up @@ -472,7 +475,10 @@
context: context,
barrierColor: Colors.transparent,
builder: (BuildContext context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;
return AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,
title: const Text('Pick Theme Color'),
content: Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
Expand Down Expand Up @@ -534,10 +540,13 @@
showDialog(
context: context,
builder: (BuildContext context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;

Check warning on line 543 in lib/widgets/app_settings.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/app_settings.dart#L543

Added line #L543 was not covered by tests
return KeyBoardShortcuts(
keysToPress: {LogicalKeyboardKey.enter},
onKeysPressed: () => Navigator.of(context).pop(),
child: AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,

Check warning on line 549 in lib/widgets/app_settings.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/app_settings.dart#L548-L549

Added lines #L548 - L549 were not covered by tests
title: const Text('Failed to Import Field'),
content:
Text('Field with the name "$name" already exists.'),
Expand Down
3 changes: 3 additions & 0 deletions lib/widgets/dialogs/edit_field_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@

@override
Widget build(BuildContext context) {
ColorScheme colorScheme = Theme.of(context).colorScheme;

Check warning on line 39 in lib/widgets/dialogs/edit_field_dialog.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/dialogs/edit_field_dialog.dart#L39

Added line #L39 was not covered by tests
return KeyBoardShortcuts(
keysToPress: {LogicalKeyboardKey.enter},
onKeysPressed: () => confirm(context),
child: AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,

Check warning on line 45 in lib/widgets/dialogs/edit_field_dialog.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/dialogs/edit_field_dialog.dart#L44-L45

Added lines #L44 - L45 were not covered by tests
title: const Text('Edit Custom Field'),
content: Column(
mainAxisSize: MainAxisSize.min,
Expand Down
2 changes: 2 additions & 0 deletions lib/widgets/dialogs/import_field_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
keysToPress: {LogicalKeyboardKey.enter},
onKeysPressed: () => confirm(context),
child: AlertDialog(
backgroundColor: colorScheme.surface,
surfaceTintColor: colorScheme.surfaceTint,

Check warning on line 44 in lib/widgets/dialogs/import_field_dialog.dart

View check run for this annotation

Codecov / codecov/patch

lib/widgets/dialogs/import_field_dialog.dart#L43-L44

Added lines #L43 - L44 were not covered by tests
title: const Text('Import Custom Field'),
content: Column(
mainAxisSize: MainAxisSize.min,
Expand Down
Loading
Loading