Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix UI

AmanRajSinghMourya0133f2603a38
diff --git a/mobile/apps/locker/lib/ui/components/collection_popup_menu_widget.dart b/mobile/apps/locker/lib/ui/components/collection_popup_menu_widget.dart
index 344ae2f45e..1c3dfc8bf3 100644
--- a/mobile/apps/locker/lib/ui/components/collection_popup_menu_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/collection_popup_menu_widget.dart
@@ -33,6 +33,9 @@ class CollectionPopupMenuWidget extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: colorScheme.strokeFaint),
),
+ menuPadding: EdgeInsets.zero,
+ color: colorScheme.backdropBase,
+ surfaceTintColor: Colors.transparent,
elevation: 15,
shadowColor: Colors.black.withValues(alpha: 0.08),
child: child ??
@@ -57,6 +60,7 @@ class CollectionPopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: action.id,
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: Icon(
action.icon,
@@ -87,6 +91,7 @@ class CollectionPopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: 'edit',
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: HugeIcon(
icon: HugeIcons.strokeRoundedEdit02,
@@ -104,6 +109,7 @@ class CollectionPopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: 'delete',
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: HugeIcon(
icon: HugeIcons.strokeRoundedDelete01,
@@ -124,6 +130,7 @@ class CollectionPopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: 'leave_collection',
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: HugeIcon(
icon: HugeIcons.strokeRoundedLogout02,
diff --git a/mobile/apps/locker/lib/ui/components/file_popup_menu_widget.dart b/mobile/apps/locker/lib/ui/components/file_popup_menu_widget.dart
index e93f8b2dd9..e0c395cbfa 100644
--- a/mobile/apps/locker/lib/ui/components/file_popup_menu_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/file_popup_menu_widget.dart
@@ -38,6 +38,10 @@ class FilePopupMenuWidget extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: colorScheme.strokeFaint),
),
+ color: colorScheme.backdropBase,
+ surfaceTintColor: Colors.transparent,
+ padding: EdgeInsets.zero,
+ menuPadding: EdgeInsets.zero,
elevation: 15,
shadowColor: Colors.black.withValues(alpha: 0.08),
child: child ??
@@ -62,6 +66,7 @@ class FilePopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: action.id,
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: Icon(
action.icon,
@@ -82,6 +87,7 @@ class FilePopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: 'edit',
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: HugeIcon(
icon: HugeIcons.strokeRoundedPencilEdit02,
@@ -96,6 +102,7 @@ class FilePopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: 'share_link',
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: HugeIcon(
icon: HugeIcons.strokeRoundedShare08,
@@ -110,6 +117,7 @@ class FilePopupMenuWidget extends StatelessWidget {
PopupMenuItem<String>(
value: 'delete',
padding: EdgeInsets.zero,
+ height: 0,
child: MenuItemWidget(
icon: HugeIcon(
icon: HugeIcons.strokeRoundedDelete02,
diff --git a/mobile/apps/locker/lib/ui/components/menu_item_widget.dart b/mobile/apps/locker/lib/ui/components/menu_item_widget.dart
index 92c841d521..f0a141ae32 100644
--- a/mobile/apps/locker/lib/ui/components/menu_item_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/menu_item_widget.dart
@@ -8,6 +8,7 @@ class MenuItemWidget extends StatelessWidget {
final bool isLast;
final bool isDelete;
final bool isWarning;
+ final VoidCallback? onTap;
const MenuItemWidget({
super.key,
@@ -17,6 +18,7 @@ class MenuItemWidget extends StatelessWidget {
this.isLast = false,
this.isDelete = false,
this.isWarning = false,
+ this.onTap,
});
@override
@@ -24,54 +26,45 @@ class MenuItemWidget extends StatelessWidget {
final colorScheme = getEnteColorScheme(context);
final textTheme = getEnteTextTheme(context);
- return Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- Material(
- color: Colors.transparent,
+ return GestureDetector(
+ onTap: onTap,
+ child: Container(
+ decoration: BoxDecoration(
+ color: colorScheme.backdropBase,
+ border: !isLast
+ ? Border(
+ bottom: BorderSide(
+ color: colorScheme.strokeFaint,
+ width: 1,
+ ),
+ )
+ : null,
borderRadius: BorderRadius.only(
topLeft: isFirst ? const Radius.circular(15) : Radius.zero,
topRight: isFirst ? const Radius.circular(15) : Radius.zero,
bottomLeft: isLast ? const Radius.circular(15) : Radius.zero,
bottomRight: isLast ? const Radius.circular(15) : Radius.zero,
),
- child: InkWell(
- borderRadius: BorderRadius.only(
- topLeft: isFirst ? const Radius.circular(15) : Radius.zero,
- topRight: isFirst ? const Radius.circular(15) : Radius.zero,
- bottomLeft: isLast ? const Radius.circular(15) : Radius.zero,
- bottomRight: isLast ? const Radius.circular(15) : Radius.zero,
- ),
- child: Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 16,
- vertical: 16,
- ),
- child: Row(
- children: [
- icon,
- const SizedBox(width: 12),
- Expanded(
- child: Text(
- label,
- style: (isDelete || isWarning)
- ? textTheme.body
- .copyWith(color: colorScheme.warning500)
- : textTheme.body,
- ),
- ),
- ],
+ ),
+ padding: const EdgeInsets.symmetric(
+ horizontal: 16,
+ vertical: 16,
+ ),
+ child: Row(
+ children: [
+ icon,
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ label,
+ style: (isDelete || isWarning)
+ ? textTheme.body.copyWith(color: colorScheme.warning500)
+ : textTheme.body,
),
),
- ),
+ ],
),
- if (!isLast)
- Divider(
- height: 1,
- thickness: 1,
- color: colorScheme.strokeFaint,
- ),
- ],
+ ),
);
}
}