From e5455f55dfc97de9d18393cfb485f9824bce8029 Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Fri, 15 Dec 2023 18:25:47 +0100 Subject: [PATCH] Fix consistency of close button, related to #550 --- app/lib/dialogs/area/dialog.dart | 2 +- app/lib/dialogs/search.dart | 2 +- app/lib/dialogs/sync.dart | 16 ++++++++-------- app/lib/dialogs/template.dart | 2 +- .../metadata/android/en-US/changelogs/83.txt | 1 + 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/lib/dialogs/area/dialog.dart b/app/lib/dialogs/area/dialog.dart index 9821f199d665..55433b7942db 100644 --- a/app/lib/dialogs/area/dialog.dart +++ b/app/lib/dialogs/area/dialog.dart @@ -21,7 +21,7 @@ class AreasDialog extends StatelessWidget { children: [ Header( title: Text(AppLocalizations.of(context).areas), - leading: IconButton( + leading: IconButton.outlined( icon: const PhosphorIcon(PhosphorIconsLight.x), onPressed: () => Navigator.of(context).pop(), tooltip: AppLocalizations.of(context).close, diff --git a/app/lib/dialogs/search.dart b/app/lib/dialogs/search.dart index a1d7a7a26ad0..e2aaa25f5ce7 100644 --- a/app/lib/dialogs/search.dart +++ b/app/lib/dialogs/search.dart @@ -113,7 +113,7 @@ class _SearchDialogState extends State { ), ), const SizedBox(width: 8), - IconButton( + IconButton.outlined( icon: const PhosphorIcon(PhosphorIconsLight.x), onPressed: () => Navigator.pop(context), tooltip: AppLocalizations.of(context).close, diff --git a/app/lib/dialogs/sync.dart b/app/lib/dialogs/sync.dart index 93d285601010..3a810e2cbd4a 100644 --- a/app/lib/dialogs/sync.dart +++ b/app/lib/dialogs/sync.dart @@ -33,18 +33,18 @@ class _SyncDialogState extends State { children: [ Header( title: Text(status.getLocalizedName(context)), - leading: IconButton( - icon: PhosphorIcon(status.getIcon()), - onPressed: () => service.sync(), - tooltip: status.getLocalizedName(context), - ), actions: [ IconButton( - icon: const PhosphorIcon(PhosphorIconsLight.x), - onPressed: () => Navigator.pop(context), - tooltip: AppLocalizations.of(context).close, + icon: PhosphorIcon(status.getIcon()), + onPressed: () => service.sync(), + tooltip: status.getLocalizedName(context), ), ], + leading: IconButton.outlined( + icon: const PhosphorIcon(PhosphorIconsLight.x), + onPressed: () => Navigator.pop(context), + tooltip: AppLocalizations.of(context).close, + ), ), const Divider(), SingleChildScrollView( diff --git a/app/lib/dialogs/template.dart b/app/lib/dialogs/template.dart index c3a91012547a..b8a444a576c0 100644 --- a/app/lib/dialogs/template.dart +++ b/app/lib/dialogs/template.dart @@ -57,7 +57,7 @@ class _TemplateDialogState extends State { children: [ Header( title: Text(AppLocalizations.of(context).templates), - leading: IconButton( + leading: IconButton.outlined( icon: const PhosphorIcon(PhosphorIconsLight.x), onPressed: () => Navigator.of(context).pop(), tooltip: AppLocalizations.of(context).close, diff --git a/fastlane/metadata/android/en-US/changelogs/83.txt b/fastlane/metadata/android/en-US/changelogs/83.txt index 1fc7abd1adc0..bb1186af0b98 100644 --- a/fastlane/metadata/android/en-US/changelogs/83.txt +++ b/fastlane/metadata/android/en-US/changelogs/83.txt @@ -2,6 +2,7 @@ * Improve performance when saving ([#547](https://github.com/LinwoodDev/Butterfly/issues/547)) * Improve mobile add dialog * Improve selected icons in settings +* Improve consistency of close button ([#550](https://github.com/LinwoodDev/Butterfly/issues/550)) * Rename default locale to system locale * Fix calling onScale to tools on moving on touch devices ([#546](https://github.com/LinwoodDev/Butterfly/issues/546)) * Fix exporting documents as png or svg