Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use HugeIcons in selection sheet

ashilknbeb1bbdff531
diff --git a/mobile/apps/photos/lib/ui/components/bottom_action_bar/selection_action_button_widget.dart b/mobile/apps/photos/lib/ui/components/bottom_action_bar/selection_action_button_widget.dart
index 49a96b834b..b9bf69c89e 100644
--- a/mobile/apps/photos/lib/ui/components/bottom_action_bar/selection_action_button_widget.dart
+++ b/mobile/apps/photos/lib/ui/components/bottom_action_bar/selection_action_button_widget.dart
@@ -1,13 +1,13 @@
-import 'dart:math' as math;
-
import "package:ente_components/ente_components.dart" as components;
import "package:flutter/material.dart";
import "package:flutter_svg/svg.dart";
+import "package:hugeicons/hugeicons.dart";
/// Pass icon or asset path of svg
class SelectionActionButton extends StatelessWidget {
final String labelText;
final IconData? icon;
+ final List<List<dynamic>>? hugeIcon;
final Widget? iconWidget;
final String? svgAssetPath;
final VoidCallback? onTap;
@@ -18,6 +18,7 @@ class SelectionActionButton extends StatelessWidget {
required this.labelText,
required this.onTap,
this.icon,
+ this.hugeIcon,
this.svgAssetPath,
this.iconWidget,
this.shouldShow = true,
@@ -27,7 +28,12 @@ class SelectionActionButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
- assert(icon != null || iconWidget != null || svgAssetPath != null);
+ assert(
+ icon != null ||
+ hugeIcon != null ||
+ iconWidget != null ||
+ svgAssetPath != null,
+ );
return AnimatedSize(
duration: const Duration(milliseconds: 350),
curve: Curves.easeInOutCirc,
@@ -37,6 +43,7 @@ class SelectionActionButton extends StatelessWidget {
? _Body(
labelText: labelText,
icon: icon,
+ hugeIcon: hugeIcon,
onTap: onTap,
svgAssetPath: svgAssetPath,
iconWidget: iconWidget,
@@ -53,6 +60,7 @@ class SelectionActionButton extends StatelessWidget {
class _Body extends StatefulWidget {
final String labelText;
final IconData? icon;
+ final List<List<dynamic>>? hugeIcon;
final String? svgAssetPath;
final Widget? iconWidget;
final VoidCallback? onTap;
@@ -62,6 +70,7 @@ class _Body extends StatefulWidget {
required this.onTap,
required this.isCritical,
this.icon,
+ this.hugeIcon,
this.svgAssetPath,
this.iconWidget,
});
@@ -72,6 +81,7 @@ class _Body extends StatefulWidget {
class __BodyState extends State<_Body> {
static const minWidth = 64.0;
+ static const iconSize = 22.0;
late double widthOfButton;
Color? backgroundColor;
@@ -115,14 +125,11 @@ class __BodyState extends State<_Body> {
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
- if (widget.icon == Icons.navigation_rounded)
- Transform.rotate(
- angle: math.pi / 2,
- child: Icon(
- widget.icon,
- size: 24,
- color: foregroundColor,
- ),
+ if (widget.hugeIcon != null)
+ HugeIcon(
+ icon: widget.hugeIcon!,
+ size: iconSize,
+ color: foregroundColor,
)
else if (widget.svgAssetPath != null)
SvgPicture.asset(
@@ -131,15 +138,15 @@ class __BodyState extends State<_Body> {
foregroundColor,
BlendMode.srcIn,
),
- width: 24,
- height: 24,
+ width: iconSize,
+ height: iconSize,
)
else if (widget.iconWidget != null)
widget.iconWidget!
else
Icon(
widget.icon,
- size: 24,
+ size: iconSize,
color: foregroundColor,
),
const SizedBox(height: 4),
@@ -182,7 +189,7 @@ class __BodyState extends State<_Body> {
return maxWidth;
}
-//Todo: this doesn't give the correct width of the word, make it right
+ //Todo: this doesn't give the correct width of the word, make it right
double computeWidthOfWord(String text, TextStyle style) {
final textPainter = TextPainter(
text: TextSpan(text: text, style: style),
@@ -190,7 +197,7 @@ class __BodyState extends State<_Body> {
textDirection: TextDirection.ltr,
textScaler: MediaQuery.textScalerOf(context),
)..layout();
-//buffer of 8 added as width is shorter than actual text width
+ //buffer of 8 added as width is shorter than actual text width
return textPainter.size.width + 8;
}
}
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dart
index c6fafc83b9..f83dfe49bd 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dart
@@ -1,6 +1,6 @@
import "package:ente_pure_utils/ente_pure_utils.dart";
-import "package:flutter/cupertino.dart";
import "package:flutter/material.dart";
+import "package:hugeicons/hugeicons.dart";
import "package:logging/logging.dart";
import "package:photos/core/configuration.dart";
import "package:photos/db/files_db.dart";
@@ -73,14 +73,14 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).share,
- icon: Icons.adaptive.share,
+ hugeIcon: HugeIcons.strokeRoundedShare03,
onTap: _shareCollection,
),
);
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).pinAlbum,
- icon: Icons.push_pin_rounded,
+ hugeIcon: HugeIcons.strokeRoundedPin,
onTap: _onPinClick,
shouldShow: hasUnpinnedAlbum,
),
@@ -89,7 +89,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).unpinAlbum,
- icon: CupertinoIcons.pin_slash,
+ hugeIcon: HugeIcons.strokeRoundedPinOff,
onTap: _onUnpinClick,
shouldShow: hasPinnedAlbum,
),
@@ -98,7 +98,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).delete,
- icon: Icons.delete_outline,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
onTap: _trashCollection,
isCritical: true,
),
@@ -106,7 +106,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).hide,
- icon: Icons.visibility_off_outlined,
+ hugeIcon: HugeIcons.strokeRoundedViewOffSlash,
onTap: _onHideOrUnHideClick,
),
);
@@ -117,14 +117,14 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).unarchive,
- icon: Icons.unarchive_outlined,
+ hugeIcon: HugeIcons.strokeRoundedUnarchive03,
onTap: _archiveClick,
),
);
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).delete,
- icon: Icons.delete_outline,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
onTap: _trashCollection,
isCritical: true,
),
@@ -134,14 +134,14 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).unhide,
- icon: Icons.visibility_outlined,
+ hugeIcon: HugeIcons.strokeRoundedView,
onTap: _onHideOrUnHideClick,
),
);
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).delete,
- icon: Icons.delete_outline,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
onTap: _trashCollection,
isCritical: true,
),
@@ -150,7 +150,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).archive,
- icon: Icons.archive_outlined,
+ hugeIcon: HugeIcons.strokeRoundedArchive03,
onTap: _archiveClick,
),
);
@@ -170,7 +170,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).pinAlbum,
- icon: Icons.push_pin_rounded,
+ hugeIcon: HugeIcons.strokeRoundedPin,
onTap: _onPinClickForSharee,
shouldShow: hasShareeUnpinnedAlbum,
),
@@ -179,7 +179,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).unpinAlbum,
- icon: CupertinoIcons.pin_slash,
+ hugeIcon: HugeIcons.strokeRoundedPinOff,
onTap: _onUnpinClickForSharee,
shouldShow: hasShareePinnedAlbum,
),
@@ -190,7 +190,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).hide,
- icon: Icons.visibility_off_outlined,
+ hugeIcon: HugeIcons.strokeRoundedViewOffSlash,
onTap: _onHideOrUnHideClick,
),
);
@@ -198,7 +198,7 @@ class _AlbumSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).leaveAlbum,
- icon: Icons.logout,
+ hugeIcon: HugeIcons.strokeRoundedLogout05,
onTap: _leaveAlbum,
),
);
@@ -371,10 +371,12 @@ class _AlbumSelectionActionWidgetState
for (final collection in collections) {
final isOwner = collection.isOwner(userID);
final isHidden = collection.isHidden();
- final int prevVisiblity =
- isHidden ? hiddenVisibility : visibleVisibility;
- final int newVisiblity =
- isHidden ? visibleVisibility : hiddenVisibility;
+ final int prevVisiblity = isHidden
+ ? hiddenVisibility
+ : visibleVisibility;
+ final int newVisiblity = isHidden
+ ? visibleVisibility
+ : hiddenVisibility;
await changeCollectionVisibility(
context,
@@ -420,8 +422,8 @@ class _AlbumSelectionActionWidgetState
// Determine if we're archiving or unarchiving based on first collection
final isUnarchiving =
widget.sectionType == UISectionType.incomingCollections
- ? collections.first.hasShareeArchived()
- : collections.first.isArchived();
+ ? collections.first.hasShareeArchived()
+ : collections.first.isArchived();
final dialog = createProgressDialog(
context,
isUnarchiving
@@ -434,10 +436,12 @@ class _AlbumSelectionActionWidgetState
for (final collection in collections) {
if (widget.sectionType == UISectionType.incomingCollections) {
final hasShareeArchived = collection.hasShareeArchived();
- final int prevVisiblity =
- hasShareeArchived ? archiveVisibility : visibleVisibility;
- final int newVisiblity =
- hasShareeArchived ? visibleVisibility : archiveVisibility;
+ final int prevVisiblity = hasShareeArchived
+ ? archiveVisibility
+ : visibleVisibility;
+ final int newVisiblity = hasShareeArchived
+ ? visibleVisibility
+ : archiveVisibility;
await changeCollectionVisibility(
context,
@@ -449,10 +453,12 @@ class _AlbumSelectionActionWidgetState
);
} else {
final isArchived = collection.isArchived();
- final int prevVisiblity =
- isArchived ? archiveVisibility : visibleVisibility;
- final int newVisiblity =
- isArchived ? visibleVisibility : archiveVisibility;
+ final int prevVisiblity = isArchived
+ ? archiveVisibility
+ : visibleVisibility;
+ final int newVisiblity = isArchived
+ ? visibleVisibility
+ : archiveVisibility;
await changeCollectionVisibility(
context,
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/album_selection_overlay_bar.dart b/mobile/apps/photos/lib/ui/viewer/actions/album_selection_overlay_bar.dart
index 95ec853cf0..3ac9a22952 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/album_selection_overlay_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/album_selection_overlay_bar.dart
@@ -1,5 +1,6 @@
import "package:ente_components/ente_components.dart" as components;
import 'package:flutter/material.dart';
+import "package:hugeicons/hugeicons.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/models/collection/collection.dart";
import "package:photos/models/selected_albums.dart";
@@ -158,10 +159,10 @@ class _SelectAllAlbumsButtonState extends State<SelectAllAlbumsButton> {
} else {
_allSelected = false;
}
- return Icon(
- _allSelected
- ? Icons.check_circle
- : Icons.check_circle_outline,
+ return HugeIcon(
+ icon: _allSelected
+ ? HugeIcons.strokeRoundedCheckmarkCircle01
+ : HugeIcons.strokeRoundedCircle,
color: colors.textBase,
size: 18,
);
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
index cacc446da5..26aa4e05db 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -1,9 +1,9 @@
import "dart:async";
-import 'package:ente_icons/ente_icons.dart';
import "package:ente_pure_utils/ente_pure_utils.dart";
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import "package:hugeicons/hugeicons.dart";
import "package:local_auth/local_auth.dart";
import "package:logging/logging.dart";
import "package:modal_bottom_sheet/modal_bottom_sheet.dart";
@@ -134,7 +134,8 @@ class _FileSelectionActionsWidgetState
final ownedAndPendingUploadFilesCount =
ownedFilesCount + split.pendingUploads.length;
final bool canRemoveOthersFiles = _canRemoveOthersFiles;
- final int removeCount = split.ownedByCurrentUser.length +
+ final int removeCount =
+ split.ownedByCurrentUser.length +
(canRemoveOthersFiles ? split.ownedByOtherUsers.length : 0);
final bool anyOwnedFiles =
@@ -148,18 +149,19 @@ class _FileSelectionActionsWidgetState
);
final showCollageOption =
CollageCreatorPage.isValidCount(widget.selectedFiles.files.length) &&
- !widget.selectedFiles.files.any(
- (element) => element.fileType == FileType.video,
- );
+ !widget.selectedFiles.files.any(
+ (element) => element.fileType == FileType.video,
+ );
final showDownloadOption = hasUploadedFileIDs;
- final bool isCollectionOwnerOrAdmin = widget.collection != null &&
+ final bool isCollectionOwnerOrAdmin =
+ widget.collection != null &&
(widget.collection!.isOwner(currentUserID) ||
widget.collection!.isAdmin(currentUserID));
final bool canSuggestDeleteAction =
(widget.type == GalleryType.sharedCollection ||
- widget.type == GalleryType.ownedCollection) &&
- isCollectionOwnerOrAdmin &&
- split.ownedByOtherUsers.isNotEmpty;
+ widget.type == GalleryType.ownedCollection) &&
+ isCollectionOwnerOrAdmin &&
+ split.ownedByOtherUsers.isNotEmpty;
//To animate adding and removing of [SelectedActionButton], add all items
//and set [shouldShow] to false for items that should not be shown and true
@@ -168,14 +170,14 @@ class _FileSelectionActionsWidgetState
if (widget.type == GalleryType.trash) {
items.add(
SelectionActionButton(
- icon: Icons.restore_outlined,
+ hugeIcon: HugeIcons.strokeRoundedRestoreBin,
labelText: AppLocalizations.of(context).restore,
onTap: _restore,
),
);
items.add(
SelectionActionButton(
- icon: Icons.delete_forever_outlined,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
labelText: AppLocalizations.of(context).permanentlyDelete,
onTap: _permanentlyDelete,
isCritical: true,
@@ -184,7 +186,7 @@ class _FileSelectionActionsWidgetState
} else if (widget.type == GalleryType.cleanupHiddenFromDevice) {
items.add(
SelectionActionButton(
- icon: Icons.delete_outline,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
labelText: AppLocalizations.of(context).deleteFromDevice,
onTap: _deleteSelectedFromDevice,
isCritical: true,
@@ -193,7 +195,7 @@ class _FileSelectionActionsWidgetState
} else if (widget.type == GalleryType.deleteSuggestions) {
items.add(
SelectionActionButton(
- icon: Icons.delete_outline,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
labelText: AppLocalizations.of(context).delete,
onTap: split.ownedByCurrentUser.isNotEmpty ? _onDeleteClick : null,
isCritical: true,
@@ -201,7 +203,7 @@ class _FileSelectionActionsWidgetState
);
items.add(
SelectionActionButton(
- icon: Icons.clear,
+ hugeIcon: HugeIcons.strokeRoundedCancel01,
labelText: AppLocalizations.of(context).rejectSuggestions,
onTap: widget.selectedFiles.files.isNotEmpty
? _rejectDeleteSuggestions
@@ -213,7 +215,7 @@ class _FileSelectionActionsWidgetState
if (_cachedCollectionForSharedLink != null && anyUploadedFiles) {
items.add(
SelectionActionButton(
- icon: Icons.copy_outlined,
+ hugeIcon: HugeIcons.strokeRoundedCopy01,
labelText: AppLocalizations.of(context).copyLink,
onTap: anyUploadedFiles ? _sendLink : null,
),
@@ -221,7 +223,7 @@ class _FileSelectionActionsWidgetState
} else {
items.add(
SelectionActionButton(
- icon: Icons.navigation_rounded,
+ hugeIcon: HugeIcons.strokeRoundedNavigation03,
labelText: AppLocalizations.of(context).sendLink,
onTap: anyUploadedFiles ? _onSendLinkTapped : null,
shouldShow: ownedFilesCount > 0,
@@ -233,7 +235,7 @@ class _FileSelectionActionsWidgetState
if (widget.type == GalleryType.peopleTag && widget.person != null) {
items.add(
SelectionActionButton(
- icon: Icons.remove_circle_outline,
+ hugeIcon: HugeIcons.strokeRoundedUserRemove01,
labelText: AppLocalizations.of(
context,
).notPersonLabel(name: widget.person!.data.name),
@@ -243,7 +245,7 @@ class _FileSelectionActionsWidgetState
if (ownedFilesCount == 1) {
items.add(
SelectionActionButton(
- icon: Icons.image_outlined,
+ hugeIcon: HugeIcons.strokeRoundedImage01,
labelText: AppLocalizations.of(context).useAsCover,
onTap: anyUploadedFiles ? _setPersonCover : null,
),
@@ -255,19 +257,20 @@ class _FileSelectionActionsWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).notThisPerson,
- icon: Icons.remove_circle_outline,
+ hugeIcon: HugeIcons.strokeRoundedUserRemove01,
onTap: _onRemoveFromClusterClicked,
),
);
}
- final showUploadIcon = widget.type == GalleryType.localFolder &&
+ final showUploadIcon =
+ widget.type == GalleryType.localFolder &&
split.ownedByCurrentUser.isEmpty;
if (widget.type.showAddToAlbum() && !isLocalGalleryMode) {
if (showUploadIcon) {
items.add(
SelectionActionButton(
- icon: Icons.cloud_upload_outlined,
+ hugeIcon: HugeIcons.strokeRoundedCloudUpload,
labelText: AppLocalizations.of(context).addToEnte,
onTap: _addToAlbum,
),
@@ -275,7 +278,7 @@ class _FileSelectionActionsWidgetState
} else {
items.add(
SelectionActionButton(
- icon: Icons.add_outlined,
+ hugeIcon: HugeIcons.strokeRoundedImageAdd01,
labelText: AppLocalizations.of(context).addToAlbum,
onTap: _addToAlbum,
),
@@ -286,7 +289,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showAddtoHiddenAlbum()) {
items.add(
SelectionActionButton(
- icon: Icons.add_outlined,
+ hugeIcon: HugeIcons.strokeRoundedImageAdd01,
labelText: AppLocalizations.of(context).addToAlbum,
onTap: _addToHiddenAlbum,
),
@@ -296,7 +299,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showMoveToAlbum()) {
items.add(
SelectionActionButton(
- icon: Icons.arrow_forward_outlined,
+ hugeIcon: HugeIcons.strokeRoundedArrowRight01,
labelText: AppLocalizations.of(context).moveToAlbum,
onTap: anyUploadedFiles ? _moveFiles : null,
shouldShow: ownedFilesCount > 0,
@@ -307,7 +310,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showMovetoHiddenAlbum()) {
items.add(
SelectionActionButton(
- icon: Icons.arrow_forward_outlined,
+ hugeIcon: HugeIcons.strokeRoundedArrowRight01,
labelText: AppLocalizations.of(context).moveToAlbum,
onTap: _moveFilesToHiddenAlbum,
),
@@ -317,7 +320,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showDeleteOption()) {
items.add(
SelectionActionButton(
- icon: Icons.delete_outline,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
labelText: AppLocalizations.of(context).delete,
onTap: anyOwnedFiles ? _onDeleteClick : null,
shouldShow: allOwnedFiles,
@@ -329,7 +332,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showRemoveFromAlbum()) {
items.add(
SelectionActionButton(
- icon: Icons.remove_outlined,
+ hugeIcon: HugeIcons.strokeRoundedRemove01,
labelText: AppLocalizations.of(context).removeFromAlbum,
onTap: removeCount > 0 ? _removeFilesFromAlbum : null,
shouldShow: removeCount > 0,
@@ -340,7 +343,7 @@ class _FileSelectionActionsWidgetState
if (canSuggestDeleteAction) {
items.add(
SelectionActionButton(
- icon: Icons.flag_outlined,
+ hugeIcon: HugeIcons.strokeRoundedFlag01,
labelText: AppLocalizations.of(context).suggestDeletion,
onTap: _onSuggestDelete,
),
@@ -350,7 +353,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showRemoveFromHiddenAlbum()) {
items.add(
SelectionActionButton(
- icon: Icons.remove_outlined,
+ hugeIcon: HugeIcons.strokeRoundedRemove01,
labelText: AppLocalizations.of(context).removeFromAlbum,
onTap: _removeFilesFromHiddenAlbum,
),
@@ -360,7 +363,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showFavoriteOption()) {
items.add(
SelectionActionButton(
- icon: EnteIcons.favoriteStroke,
+ hugeIcon: HugeIcons.strokeRoundedFavourite,
labelText: AppLocalizations.of(context).favorite,
onTap: anyUploadedFiles ? _onFavoriteClick : null,
shouldShow: ownedFilesCount > 0,
@@ -369,7 +372,7 @@ class _FileSelectionActionsWidgetState
} else if (widget.type.showUnFavoriteOption()) {
items.add(
SelectionActionButton(
- icon: EnteIcons.favoriteFilled,
+ hugeIcon: HugeIcons.strokeRoundedHeartRemove,
labelText: AppLocalizations.of(context).removeFromFavorite,
onTap: _onUnFavoriteClick,
shouldShow: ownedFilesCount > 0,
@@ -378,7 +381,7 @@ class _FileSelectionActionsWidgetState
}
items.add(
SelectionActionButton(
- svgAssetPath: "assets/icons/guest_view_icon.svg",
+ hugeIcon: HugeIcons.strokeRoundedIncognito,
labelText: AppLocalizations.of(context).guestView,
onTap: _onGuestViewClick,
),
@@ -388,7 +391,7 @@ class _FileSelectionActionsWidgetState
widget.type.showAddToPersonOption()) {
items.add(
SelectionActionButton(
- icon: Icons.person_add_alt_1_outlined,
+ hugeIcon: HugeIcons.strokeRoundedUserAdd01,
labelText: AppLocalizations.of(context).addToPerson,
onTap: hasUploadedFileIDs ? _onAddFilesToPerson : null,
shouldShow: hasUploadedFileIDs,
@@ -398,7 +401,7 @@ class _FileSelectionActionsWidgetState
if (widget.type != GalleryType.sharedPublicCollection) {
items.add(
SelectionActionButton(
- icon: Icons.grid_view_outlined,
+ hugeIcon: HugeIcons.strokeRoundedGridView,
labelText: AppLocalizations.of(context).createCollage,
onTap: _onCreateCollageClicked,
shouldShow: showCollageOption,
@@ -409,7 +412,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showHideOption()) {
items.add(
SelectionActionButton(
- icon: Icons.visibility_off_outlined,
+ hugeIcon: HugeIcons.strokeRoundedViewOffSlash,
labelText: AppLocalizations.of(context).hide,
onTap: anyUploadedFiles ? _onHideClick : null,
shouldShow: ownedFilesCount > 0,
@@ -418,7 +421,7 @@ class _FileSelectionActionsWidgetState
} else if (widget.type.showUnHideOption()) {
items.add(
SelectionActionButton(
- icon: Icons.visibility_outlined,
+ hugeIcon: HugeIcons.strokeRoundedView,
labelText: AppLocalizations.of(context).unhide,
onTap: _onUnhideClick,
shouldShow: ownedFilesCount > 0,
@@ -428,7 +431,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showArchiveOption()) {
items.add(
SelectionActionButton(
- icon: Icons.archive_outlined,
+ hugeIcon: HugeIcons.strokeRoundedArchive03,
labelText: AppLocalizations.of(context).archive,
onTap: anyUploadedFiles ? _onArchiveClick : null,
shouldShow: ownedFilesCount > 0,
@@ -437,7 +440,7 @@ class _FileSelectionActionsWidgetState
} else if (widget.type.showUnArchiveOption()) {
items.add(
SelectionActionButton(
- icon: Icons.unarchive,
+ hugeIcon: HugeIcons.strokeRoundedUnarchive03,
labelText: AppLocalizations.of(context).unarchive,
onTap: _onUnArchiveClick,
shouldShow: ownedFilesCount > 0,
@@ -448,7 +451,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showRestoreOption()) {
items.add(
SelectionActionButton(
- icon: Icons.restore_outlined,
+ hugeIcon: HugeIcons.strokeRoundedRestoreBin,
labelText: AppLocalizations.of(context).restore,
onTap: _restore,
),
@@ -458,7 +461,7 @@ class _FileSelectionActionsWidgetState
if (widget.type.showPermanentlyDeleteOption()) {
items.add(
SelectionActionButton(
- icon: Icons.delete_forever_outlined,
+ hugeIcon: HugeIcons.strokeRoundedDelete01,
labelText: AppLocalizations.of(context).permanentlyDelete,
onTap: _permanentlyDelete,
isCritical: true,
@@ -473,7 +476,7 @@ class _FileSelectionActionsWidgetState
(element) => (element.ownerID == currentUserID),
),
labelText: AppLocalizations.of(context).editTime,
- icon: Icons.edit_calendar_outlined,
+ hugeIcon: HugeIcons.strokeRoundedDateTime,
onTap: () async {
final newDate = await showEditDateSheet(
context,
@@ -494,7 +497,7 @@ class _FileSelectionActionsWidgetState
(element) => (element.ownerID == currentUserID),
),
labelText: AppLocalizations.of(context).editLocation,
- icon: Icons.edit_location_alt_outlined,
+ hugeIcon: HugeIcons.strokeRoundedMapsEditing,
onTap: _editLocation,
),
);
@@ -504,7 +507,7 @@ class _FileSelectionActionsWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).download,
- icon: Icons.cloud_download_outlined,
+ hugeIcon: HugeIcons.strokeRoundedDownload01,
onTap: () => _download(widget.selectedFiles.files.toList()),
),
);
@@ -513,7 +516,7 @@ class _FileSelectionActionsWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).share,
- icon: Icons.adaptive.share_outlined,
+ hugeIcon: HugeIcons.strokeRoundedShare03,
key: shareButtonKey,
onTap: _shareSelectedFiles,
),
@@ -1162,7 +1165,8 @@ class _FileSelectionActionsWidgetState
);
downloadedFiles++;
dialog.update(
- message: AppLocalizations.of(context).downloading +
+ message:
+ AppLocalizations.of(context).downloading +
" ($downloadedFiles/$totalFiles)",
);
}),
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart
index 0fd5d479a3..bdb87c2c2e 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_overlay_bar.dart
@@ -3,6 +3,7 @@ import "dart:io";
import "package:ente_components/ente_components.dart" as components;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import "package:hugeicons/hugeicons.dart";
import "package:photos/generated/l10n.dart";
import 'package:photos/models/collection/collection.dart';
import 'package:photos/models/gallery_type.dart';
@@ -85,8 +86,9 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar>
@override
void didChangeDependencies() {
super.didChangeDependencies();
- final inheritedSearchFilterData =
- InheritedSearchFilterData.maybeOf(context);
+ final inheritedSearchFilterData = InheritedSearchFilterData.maybeOf(
+ context,
+ );
if (inheritedSearchFilterData?.isHierarchicalSearchable ?? false) {
_searchFilterDataProvider =
inheritedSearchFilterData!.searchFilterDataProvider;
@@ -224,8 +226,9 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar>
if (initialFilter is FaceFilter) {
for (HierarchicalSearchFilter filter in appliedFilters) {
if (filter is OnlyThemFilter) {
- if (filter.faceFilters
- .any((faceFilter) => faceFilter.isSameFilter(initialFilter))) {
+ if (filter.faceFilters.any(
+ (faceFilter) => faceFilter.isSameFilter(initialFilter),
+ )) {
initalFilterIsInAppliedFiters = true;
break;
}
@@ -310,10 +313,10 @@ class _SelectAllButtonState extends State<SelectAllButton> {
} else {
_allSelected = false;
}
- return Icon(
- _allSelected
- ? Icons.check_circle
- : Icons.check_circle_outline,
+ return HugeIcon(
+ icon: _allSelected
+ ? HugeIcons.strokeRoundedCheckmarkCircle01
+ : HugeIcons.strokeRoundedCircle,
color: colors.textBase,
size: 18,
);
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dart
index 3442c1590d..7e1854a313 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dart
@@ -1,5 +1,6 @@
import "package:ente_pure_utils/ente_pure_utils.dart";
import "package:flutter/material.dart";
+import "package:hugeicons/hugeicons.dart";
import "package:logging/logging.dart";
import "package:photos/core/event_bus.dart";
import "package:photos/events/people_changed_event.dart";
@@ -111,56 +112,61 @@ class _PeopleSelectionActionWidgetState
.toList();
final onlyIgnoredPersonsSelected =
ignoredSelectedPersonIds.isNotEmpty &&
- selectedClusterIds.isEmpty &&
- ignoredSelectedPersonIds.length == selectedPersonIds.length;
- final bool namedPersonsSelected = selectedPersonIds.isNotEmpty &&
+ selectedClusterIds.isEmpty &&
+ ignoredSelectedPersonIds.length == selectedPersonIds.length;
+ final bool namedPersonsSelected =
+ selectedPersonIds.isNotEmpty &&
selectedPersonIds.every(
(id) => (personMap[id]?.data.name ?? "").isNotEmpty,
);
final bool showEditAction = onlyOnePerson;
final bool showReviewAction = onlyOnePerson;
- final bool showMergeAction =
- onlyIgnoredPersonsSelected ? false : selectedClusterIds.isNotEmpty;
- final bool showResetAction =
- onlyIgnoredPersonsSelected ? false : onlyOnePerson;
+ final bool showMergeAction = onlyIgnoredPersonsSelected
+ ? false
+ : selectedClusterIds.isNotEmpty;
+ final bool showResetAction = onlyIgnoredPersonsSelected
+ ? false
+ : onlyOnePerson;
final bool showShowPersonAction = onlyIgnoredPersonsSelected;
- final bool showAutoAddAction =
- onlyIgnoredPersonsSelected ? false : onlyPersonSelected;
+ final bool showAutoAddAction = onlyIgnoredPersonsSelected
+ ? false
+ : onlyPersonSelected;
final bool showPinAction = onlyIgnoredPersonsSelected
? false
: onlyPersonSelected &&
- namedPersonsSelected &&
- selectedPersonIds.every(
- (id) => !(personMap[id]?.data.isPinned ?? false),
- );
+ namedPersonsSelected &&
+ selectedPersonIds.every(
+ (id) => !(personMap[id]?.data.isPinned ?? false),
+ );
final bool showUnpinAction = onlyIgnoredPersonsSelected
? false
: onlyPersonSelected &&
- namedPersonsSelected &&
- selectedPersonIds.every(
- (id) => personMap[id]?.data.isPinned ?? false,
- );
+ namedPersonsSelected &&
+ selectedPersonIds.every(
+ (id) => personMap[id]?.data.isPinned ?? false,
+ );
final bool showHideFromMemoriesAction = onlyIgnoredPersonsSelected
? false
: onlyPersonSelected &&
- namedPersonsSelected &&
- selectedPersonIds.every(
- (id) => !(personMap[id]?.data.hideFromMemories ?? false),
- );
+ namedPersonsSelected &&
+ selectedPersonIds.every(
+ (id) => !(personMap[id]?.data.hideFromMemories ?? false),
+ );
final bool showShowInMemoriesAction = onlyIgnoredPersonsSelected
? false
: onlyPersonSelected &&
- namedPersonsSelected &&
- selectedPersonIds.every(
- (id) => personMap[id]?.data.hideFromMemories ?? false,
- );
+ namedPersonsSelected &&
+ selectedPersonIds.every(
+ (id) => personMap[id]?.data.hideFromMemories ?? false,
+ );
final bool hasNonIgnoredSelectedPerson = selectedPersonIds.any(
(id) => !(personMap[id]?.data.isIgnored ?? true),
);
final bool showIgnoreAction = onlyIgnoredPersonsSelected
? false
: selectedClusterIds.isNotEmpty || hasNonIgnoredSelectedPerson;
- final bool hasVisibleAction = showEditAction ||
+ final bool hasVisibleAction =
+ showEditAction ||
showReviewAction ||
showIgnoreAction ||
showMergeAction ||
@@ -179,7 +185,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).edit,
- icon: Icons.edit_outlined,
+ hugeIcon: HugeIcons.strokeRoundedPencilEdit01,
onTap: _onEditPerson,
shouldShow: showEditAction,
),
@@ -187,7 +193,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).review,
- icon: Icons.search_outlined,
+ hugeIcon: HugeIcons.strokeRoundedSearch01,
onTap: _onReviewSuggestion,
shouldShow: showReviewAction,
),
@@ -195,7 +201,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).ignore,
- icon: Icons.hide_image_outlined,
+ hugeIcon: HugeIcons.strokeRoundedImageNotFound01,
onTap: _onIgnore,
shouldShow: showIgnoreAction,
),
@@ -203,7 +209,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).merge,
- icon: Icons.merge_outlined,
+ hugeIcon: HugeIcons.strokeRoundedGitMerge,
onTap: _onMerge,
shouldShow: showMergeAction,
),
@@ -211,7 +217,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).reset,
- icon: Icons.remove_outlined,
+ hugeIcon: HugeIcons.strokeRoundedRemove01,
onTap: _onResetPerson,
shouldShow: showResetAction,
),
@@ -219,7 +225,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).showPerson,
- icon: Icons.visibility_outlined,
+ hugeIcon: HugeIcons.strokeRoundedView,
onTap: _onShowPerson,
shouldShow: showShowPersonAction,
),
@@ -227,7 +233,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).pin,
- icon: Icons.push_pin_outlined,
+ hugeIcon: HugeIcons.strokeRoundedPin,
onTap: () => _updatePinState(true),
shouldShow: showPinAction,
),
@@ -235,7 +241,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).unpin,
- icon: Icons.push_pin,
+ hugeIcon: HugeIcons.strokeRoundedPinOff,
onTap: () => _updatePinState(false),
shouldShow: showUnpinAction,
),
@@ -243,7 +249,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: AppLocalizations.of(context).hideFromMemories,
- icon: Icons.visibility_off_outlined,
+ hugeIcon: HugeIcons.strokeRoundedViewOffSlash,
onTap: () => _updateHideFromMemoriesState(true),
shouldShow: showHideFromMemoriesAction,
),
@@ -251,7 +257,7 @@ class _PeopleSelectionActionWidgetState
items.add(
SelectionActionButton(
labelText: context.l10n.showInMemories,
- icon: Icons.visibility_outlined,
+ hugeIcon: HugeIcons.strokeRoundedView,
onTap: () => _updateHideFromMemoriesState(false),
shouldShow: showShowInMemoriesAction,
),
@@ -261,8 +267,8 @@ class _PeopleSelectionActionWidgetState
labelText: AppLocalizations.of(context).autoAddToAlbum,
iconWidget: Image.asset(
"assets/auto-add-people.png",
- width: 24,
- height: 24,
+ width: 22,
+ height: 22,
color: EnteTheme.isDark(context) ? Colors.white : Colors.black,
),
onTap: _autoAddToAlbum,
@@ -541,10 +547,12 @@ class _PeopleSelectionActionWidgetState
await showChoiceDialog(
context,
title: multiple
- ? AppLocalizations.of(context)
- .areYouSureYouWantToShowThesePeopleInPeopleSectionAgain
- : AppLocalizations.of(context)
- .areYouSureYouWantToShowThisPersonInPeopleSectionAgain,
+ ? AppLocalizations.of(
+ context,
+ ).areYouSureYouWantToShowThesePeopleInPeopleSectionAgain
+ : AppLocalizations.of(
+ context,
+ ).areYouSureYouWantToShowThisPersonInPeopleSectionAgain,
firstButtonLabel: multiple
? AppLocalizations.of(context).yesShowPeople
: AppLocalizations.of(context).yesShowPerson,
@@ -578,8 +586,10 @@ class _PeopleSelectionActionWidgetState
if (selectedClusterIds.isEmpty) return;
if (!mounted) return;
- final namedSelectedPersonIds =
- _getNamedSelectedPersonIds(selectedPersonIds, personMap);
+ final namedSelectedPersonIds = _getNamedSelectedPersonIds(
+ selectedPersonIds,
+ personMap,
+ );
String? targetPersonId;
PersonEntity? targetPerson;