Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix bottom bar social icons alignment and add tooltips

ashilkn77b164cfb8fb
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arb
index 6ca0beb36b..c24043685d 100644
--- a/mobile/apps/photos/lib/l10n/intl_en.arb
+++ b/mobile/apps/photos/lib/l10n/intl_en.arb
@@ -2284,5 +2284,7 @@
}
}
},
- "noActivityYet": "No activity yet"
+ "noActivityYet": "No activity yet",
+ "like": "Like",
+ "comments": "Comments"
}
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dart b/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dart
index 243ea716a4..e9856ff30c 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dart
@@ -348,18 +348,25 @@ class FileBottomBarState extends State<FileBottomBar> {
}
Widget _buildHeartIcon() {
- return Padding(
- padding: const EdgeInsets.only(top: 12),
- child: GestureDetector(
- onTap: _toggleReaction,
- onLongPress: _showLikesBottomSheet,
- child: Icon(
- _hasLiked
- ? (Platform.isAndroid ? Icons.favorite : Icons.favorite_rounded)
- : (Platform.isAndroid
- ? Icons.favorite_border
- : Icons.favorite_border_rounded),
- color: _hasLiked ? const Color(0xFF08C225) : Colors.white,
+ return Tooltip(
+ message: AppLocalizations.of(context).like,
+ child: Padding(
+ padding: const EdgeInsets.only(top: 12),
+ child: GestureDetector(
+ onLongPress: _showLikesBottomSheet,
+ child: IconButton(
+ onPressed: _toggleReaction,
+ icon: Icon(
+ _hasLiked
+ ? (Platform.isAndroid
+ ? Icons.favorite
+ : Icons.favorite_rounded)
+ : (Platform.isAndroid
+ ? Icons.favorite_border
+ : Icons.favorite_border_rounded),
+ color: _hasLiked ? const Color(0xFF08C225) : Colors.white,
+ ),
+ ),
),
),
);
@@ -499,47 +506,50 @@ class FileBottomBarState extends State<FileBottomBar> {
}
Widget _buildCommentIcon() {
- return GestureDetector(
- onTap: _openCommentsScreen,
+ return Tooltip(
+ message: AppLocalizations.of(context).comments,
child: Padding(
padding: const EdgeInsets.only(top: 12),
- child: Stack(
- clipBehavior: Clip.none,
- children: [
- const HugeIcon(
- icon: HugeIcons.strokeRoundedBubbleChat,
- color: Colors.white,
- ),
- if (_commentCount > 0)
- Positioned(
- right: -4,
- top: -4,
- child: Container(
- padding: const EdgeInsets.symmetric(
- horizontal: 4,
- vertical: 1,
- ),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: const BorderRadius.all(Radius.circular(16)),
- border: Border.all(
- color: Colors.black,
- width: 2,
- strokeAlign: BorderSide.strokeAlignOutside,
+ child: IconButton(
+ onPressed: _openCommentsScreen,
+ icon: Stack(
+ clipBehavior: Clip.none,
+ children: [
+ const HugeIcon(
+ icon: HugeIcons.strokeRoundedBubbleChat,
+ color: Colors.white,
+ ),
+ if (_commentCount > 0)
+ Positioned(
+ right: -4,
+ top: -4,
+ child: Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 4,
+ vertical: 1,
),
- ),
- child: Text(
- _commentCount > 99 ? '99+' : _commentCount.toString(),
- style: const TextStyle(
- color: Colors.black,
- fontSize: 8,
- fontWeight: FontWeight.w500,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: const BorderRadius.all(Radius.circular(16)),
+ border: Border.all(
+ color: Colors.black,
+ width: 2,
+ strokeAlign: BorderSide.strokeAlignOutside,
+ ),
+ ),
+ child: Text(
+ _commentCount > 99 ? '99+' : _commentCount.toString(),
+ style: const TextStyle(
+ color: Colors.black,
+ fontSize: 8,
+ fontWeight: FontWeight.w500,
+ ),
+ textAlign: TextAlign.center,
),
- textAlign: TextAlign.center,
),
),
- ),
- ],
+ ],
+ ),
),
),
);