diff --git a/api/pubspec.lock b/api/pubspec.lock index 942f74a7c039..58f3e9fc48c2 100644 --- a/api/pubspec.lock +++ b/api/pubspec.lock @@ -174,14 +174,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.6" - dart_mappable: - dependency: transitive - description: - name: dart_mappable - sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382 - url: "https://pub.dev" - source: hosted - version: "4.3.0" dart_style: dependency: transitive description: @@ -591,14 +583,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" - type_plus: - dependency: transitive - description: - name: type_plus - sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 - url: "https://pub.dev" - source: hosted - version: "2.1.1" typed_data: dependency: transitive description: diff --git a/app/lib/dialogs/template.dart b/app/lib/dialogs/template.dart index 71567bcb5b72..2be67c85150d 100644 --- a/app/lib/dialogs/template.dart +++ b/app/lib/dialogs/template.dart @@ -145,15 +145,14 @@ class _TemplateDialogState extends State { ); }, ), - ...widget.bloc == null - ? [] - : [ - IconButton( - onPressed: () => _showCreateDialog(widget.bloc!), - tooltip: AppLocalizations.of(context).create, - icon: const PhosphorIcon(PhosphorIconsLight.floppyDisk), - ) - ], + ], + actions: [ + if (widget.bloc == null) + ElevatedButton.icon( + onPressed: () => _showCreateDialog(widget.bloc!), + label: Text(AppLocalizations.of(context).create), + icon: const PhosphorIcon(PhosphorIconsLight.floppyDisk), + ) ], content: FutureBuilder>( future: _templatesFuture, @@ -381,7 +380,7 @@ class _TemplateItem extends StatelessWidget { ? AspectRatio( aspectRatio: kThumbnailRatio, child: ClipRRect( - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(8), child: Image.memory( thumbnail, fit: BoxFit.cover, @@ -394,10 +393,9 @@ class _TemplateItem extends StatelessWidget { initialValue: metadata.name, subtitle: Text(metadata.description), leading: SizedBox( - height: 64, - width: 96, + width: 112, child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Checkbox( value: selected, @@ -409,7 +407,7 @@ class _TemplateItem extends StatelessWidget { } }, ), - const SizedBox(width: 8), + const SizedBox(width: 2), Flexible(child: leading), ], ), diff --git a/app/lib/views/files/view.dart b/app/lib/views/files/view.dart index 543d33b93160..8011a505e6b0 100644 --- a/app/lib/views/files/view.dart +++ b/app/lib/views/files/view.dart @@ -604,6 +604,7 @@ class FilesViewState extends State { ); } }), + const SizedBox(height: 8), BlocBuilder( buildWhen: (previous, current) => previous.starred != current.starred, builder: (context, settings) => @@ -617,7 +618,8 @@ class FilesViewState extends State { return const Center(child: CircularProgressIndicator()); } if (!snapshot.hasData) { - return Text(AppLocalizations.of(context).noElements); + return Center( + child: Text(AppLocalizations.of(context).noElements)); } final entity = snapshot.data; if (entity is! FileSystemDirectory) { @@ -688,6 +690,7 @@ class FilesViewState extends State { ); }), ), + const SizedBox(height: 32), ]), ); } diff --git a/app/lib/views/navigator/areas.dart b/app/lib/views/navigator/areas.dart index 1e72dc6b8a78..806270bd5ce4 100644 --- a/app/lib/views/navigator/areas.dart +++ b/app/lib/views/navigator/areas.dart @@ -190,6 +190,23 @@ class _AreasViewState extends State { ? area.rect.overlaps(viewportRect) : current.name == area.name, actions: [ + ...buildGeneralAreaContextMenu( + bloc, + area, + context.read(), + state.renderers + .where( + (e) => e.area == area) + .map((e) => e.transform( + position: -area.position + .toOffset(), + relative: true)) + .map((e) => e?.element) + .nonNulls + .toList(), + pop: false)(context) + .map((e) => buildMenuItem( + context, e, false, false)), MenuItemButton( leadingIcon: const PhosphorIcon( PhosphorIconsLight.trash), @@ -209,23 +226,6 @@ class _AreasViewState extends State { AppLocalizations.of(context) .delete), ), - ...buildGeneralAreaContextMenu( - bloc, - area, - context.read(), - state.renderers - .where( - (e) => e.area == area) - .map((e) => e.transform( - position: -area.position - .toOffset(), - relative: true)) - .map((e) => e?.element) - .nonNulls - .toList(), - pop: false)(context) - .map((e) => buildMenuItem( - context, e, false, false)) ], ); }); diff --git a/app/pubspec.lock b/app/pubspec.lock index b4a17585919a..87f737292ef3 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -513,10 +513,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" + sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" url: "https://pub.dev" source: hosted - version: "2.0.23" + version: "2.0.24" flutter_secure_storage: dependency: "direct main" description: @@ -1225,10 +1225,10 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" + sha256: "3c7e73920c694a436afaf65ab60ce3453d91f84208d761fbd83fc21182134d93" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.4" shared_preferences_android: dependency: transitive description: diff --git a/metadata/en-US/changelogs/125.txt b/metadata/en-US/changelogs/125.txt index d86c4fc79531..395d81b8f316 100644 --- a/metadata/en-US/changelogs/125.txt +++ b/metadata/en-US/changelogs/125.txt @@ -1,5 +1,8 @@ * Add area options to context menu in area navigator page +* Move create button to the top right of the template dialog * Improve mobile color picker +* Align no elements text to the center +* Fix spacing in home page * Fix baking not working correctly when zooming in * Fix docker image ([#769](https://github.com/LinwoodDev/Butterfly/pull/769))