Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

UI changes to search result widget

ashilkn95efb0a8c9f7
diff --git a/lib/ui/viewer/search/result/search_result_widget.dart b/lib/ui/viewer/search/result/search_result_widget.dart
index 4844626967..fde3bf283e 100644
--- a/lib/ui/viewer/search/result/search_result_widget.dart
+++ b/lib/ui/viewer/search/result/search_result_widget.dart
@@ -28,64 +28,68 @@ class SearchResultWidget extends StatelessWidget {
behavior: HitTestBehavior.opaque,
child: Container(
//todo: check and change color to figma
- color: Theme.of(context).colorScheme.searchResultsColor,
- child: Padding(
- padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 12),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SearchThumbnailWidget(
- searchResult.previewThumbnail(),
- heroTagPrefix,
- ),
- const SizedBox(width: 12),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- SizedBox(
- width: 220,
- child: Text(
- searchResult.name(),
- style: textTheme.body,
- overflow: TextOverflow.ellipsis,
- ),
- ),
- const SizedBox(height: 4),
- Row(
- children: [
- Text(
- _resultTypeName(searchResult.type()),
- style: textTheme.smallMuted,
- ),
- FutureBuilder<int>(
- future: resultCount ??
- Future.value(searchResult.resultFiles().length),
- builder: (context, snapshot) {
- if (snapshot.hasData && snapshot.data! > 0) {
- final noOfMemories = snapshot.data;
+ decoration: BoxDecoration(
+ borderRadius: const BorderRadius.all(Radius.circular(4)),
+ color: Theme.of(context).colorScheme.searchResultsColor,
+ ),
- return Text(
- " \u2022 " + noOfMemories.toString(),
- style: textTheme.smallMuted,
- );
- } else {
- return const SizedBox.shrink();
- }
- },
- ),
- ],
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SearchThumbnailWidget(
+ searchResult.previewThumbnail(),
+ heroTagPrefix,
+ ),
+ const SizedBox(width: 12),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(
+ width: 220,
+ child: Text(
+ searchResult.name(),
+ style: textTheme.body,
+ overflow: TextOverflow.ellipsis,
),
- const SizedBox(height: 2),
- ],
- ),
- const Spacer(),
- Icon(
+ ),
+ const SizedBox(height: 4),
+ Row(
+ children: [
+ Text(
+ _resultTypeName(searchResult.type()),
+ style: textTheme.smallMuted,
+ ),
+ FutureBuilder<int>(
+ future: resultCount ??
+ Future.value(searchResult.resultFiles().length),
+ builder: (context, snapshot) {
+ if (snapshot.hasData && snapshot.data! > 0) {
+ final noOfMemories = snapshot.data;
+
+ return Text(
+ " \u2022 " + noOfMemories.toString(),
+ style: textTheme.smallMuted,
+ );
+ } else {
+ return const SizedBox.shrink();
+ }
+ },
+ ),
+ ],
+ ),
+ const SizedBox(height: 2),
+ ],
+ ),
+ const Spacer(),
+ Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Icon(
Icons.chevron_right,
color: Theme.of(context).colorScheme.subTextColor,
),
- ],
- ),
+ ),
+ ],
),
),
onTap: () {
diff --git a/lib/ui/viewer/search/result/search_thumbnail_widget.dart b/lib/ui/viewer/search/result/search_thumbnail_widget.dart
index a479c8ece5..4ddac81b04 100644
--- a/lib/ui/viewer/search/result/search_thumbnail_widget.dart
+++ b/lib/ui/viewer/search/result/search_thumbnail_widget.dart
@@ -18,10 +18,10 @@ class SearchThumbnailWidget extends StatelessWidget {
return Hero(
tag: tagPrefix + (file?.tag ?? ""),
child: SizedBox(
- height: 58,
- width: 58,
+ height: 60,
+ width: 60,
child: ClipRRect(
- borderRadius: BorderRadius.circular(3),
+ borderRadius: BorderRadius.circular(4),
child: file != null
? ThumbnailWidget(
file!,