From be11b398d345785164fd57cc2ab5e091292cff3f Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 23 Feb 2024 15:47:10 +0530 Subject: [PATCH] use the 'earth' icon for GoToMap widget when locations are empty --- .../search/result/go_to_map_widget.dart | 43 ++++++++++--------- .../viewer/search_tab/locations_section.dart | 2 + 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/lib/ui/viewer/search/result/go_to_map_widget.dart b/lib/ui/viewer/search/result/go_to_map_widget.dart index fb449d824..e408417a8 100644 --- a/lib/ui/viewer/search/result/go_to_map_widget.dart +++ b/lib/ui/viewer/search/result/go_to_map_widget.dart @@ -32,30 +32,31 @@ class GoToMapWidget extends StatelessWidget { ); } }, - child: SizedBox( - width: width, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 10), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Image.asset( - "assets/map.png", + child: Padding( + padding: const EdgeInsets.fromLTRB(8, 14, 8, 0), + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Transform.scale( + scale: 1.2, + child: Image.asset( + "assets/map_world.png", width: 64, height: 64, ), - const SizedBox( - height: 10, - ), - Text( - S.of(context).yourMap, - maxLines: 2, - textAlign: TextAlign.center, - overflow: TextOverflow.ellipsis, - style: getEnteTextTheme(context).mini, - ), - ], - ), + ), + const SizedBox( + height: 11.5, + ), + Text( + S.of(context).yourMap, + maxLines: 2, + textAlign: TextAlign.center, + overflow: TextOverflow.ellipsis, + style: getEnteTextTheme(context).mini, + ), + ], ), ), ); diff --git a/lib/ui/viewer/search_tab/locations_section.dart b/lib/ui/viewer/search_tab/locations_section.dart index b27c0d7ef..6eb31c5ec 100644 --- a/lib/ui/viewer/search_tab/locations_section.dart +++ b/lib/ui/viewer/search_tab/locations_section.dart @@ -17,6 +17,7 @@ import "package:photos/ui/map/enable_map.dart"; import "package:photos/ui/map/map_screen.dart"; import "package:photos/ui/viewer/file/no_thumbnail_widget.dart"; import "package:photos/ui/viewer/file/thumbnail_widget.dart"; +import "package:photos/ui/viewer/search/result/go_to_map_widget.dart"; import "package:photos/ui/viewer/search/result/search_result_page.dart"; import "package:photos/ui/viewer/search/search_section_cta.dart"; import "package:photos/ui/viewer/search_tab/section_header.dart"; @@ -96,6 +97,7 @@ class _LocationsSectionState extends State { ), const SizedBox(width: 8), const SearchSectionEmptyCTAIcon(SectionType.location), + const GoToMapWidget(), ], ), );