Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use custom background color for social sheets in dark mode

ashilkn72ec674cab85
diff --git a/mobile/apps/photos/lib/ui/social/comments_screen.dart b/mobile/apps/photos/lib/ui/social/comments_screen.dart
index f0d4dc6afb..f83fdb545e 100644
--- a/mobile/apps/photos/lib/ui/social/comments_screen.dart
+++ b/mobile/apps/photos/lib/ui/social/comments_screen.dart
@@ -520,6 +520,7 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
final keyboardHeight = MediaQuery.of(context).viewInsets.bottom;
+ final isDarkMode = Theme.of(context).brightness == Brightness.dark;
final selectedCollection = _currentCollection;
final canModerateAnonComments = selectedCollection != null &&
(selectedCollection.isOwner(_currentUserID) ||
@@ -527,7 +528,9 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {
return Container(
decoration: BoxDecoration(
- color: colorScheme.backgroundBase,
+ color: isDarkMode
+ ? const Color(0xFF0E0E0E)
+ : colorScheme.backgroundElevated,
borderRadius: const BorderRadius.vertical(
top: Radius.circular(24),
),
diff --git a/mobile/apps/photos/lib/ui/social/like_collection_selector_sheet.dart b/mobile/apps/photos/lib/ui/social/like_collection_selector_sheet.dart
index 1f5073971b..87b54731b4 100644
--- a/mobile/apps/photos/lib/ui/social/like_collection_selector_sheet.dart
+++ b/mobile/apps/photos/lib/ui/social/like_collection_selector_sheet.dart
@@ -228,13 +228,16 @@ class _LikeCollectionSelectorSheetState
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
final mediaQuery = MediaQuery.of(context);
+ final isDarkMode = Theme.of(context).brightness == Brightness.dark;
return Container(
constraints: BoxConstraints(
maxHeight: mediaQuery.size.height * _maxHeightFraction,
),
decoration: BoxDecoration(
- color: colorScheme.backgroundBase,
+ color: isDarkMode
+ ? const Color(0xFF0E0E0E)
+ : colorScheme.backgroundBase,
borderRadius: const BorderRadius.vertical(
top: Radius.circular(28),
),
@@ -350,6 +353,7 @@ class _AlbumsHeader extends StatelessWidget {
Widget build(BuildContext context) {
final textTheme = getEnteTextTheme(context);
final colorScheme = getEnteColorScheme(context);
+ final isDarkMode = Theme.of(context).brightness == Brightness.dark;
return Padding(
padding: const EdgeInsets.fromLTRB(25, 26, 12, 16),
@@ -365,7 +369,9 @@ class _AlbumsHeader extends StatelessWidget {
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
decoration: BoxDecoration(
- color: colorScheme.backgroundBase,
+ color: isDarkMode
+ ? const Color(0xFF0E0E0E)
+ : colorScheme.backgroundBase,
borderRadius: BorderRadius.circular(14),
),
child: Row(
@@ -475,7 +481,9 @@ class _AlbumListItem extends StatelessWidget {
margin: const EdgeInsets.only(bottom: 6),
padding: const EdgeInsets.fromLTRB(16, 10, 10, 10),
decoration: BoxDecoration(
- color: colorScheme.backgroundBase,
+ color: isDarkTheme
+ ? const Color(0xFF0E0E0E)
+ : colorScheme.backgroundBase,
borderRadius: BorderRadius.circular(16),
),
child: Row(
diff --git a/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart b/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart
index 66707ff5cc..823f052410 100644
--- a/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart
+++ b/mobile/apps/photos/lib/ui/social/likes_bottom_sheet.dart
@@ -208,13 +208,16 @@ class _LikesBottomSheetState extends State<LikesBottomSheet> {
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
final mediaQuery = MediaQuery.of(context);
+ final isDarkMode = Theme.of(context).brightness == Brightness.dark;
return Container(
constraints: BoxConstraints(
maxHeight: mediaQuery.size.height * _maxHeightFraction,
),
decoration: BoxDecoration(
- color: colorScheme.backgroundBase,
+ color: isDarkMode
+ ? const Color(0xFF0E0E0E)
+ : colorScheme.backgroundElevated,
borderRadius: const BorderRadius.vertical(
top: Radius.circular(24),
),
diff --git a/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart b/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart
index 4418f8146c..4bf4e55be7 100644
--- a/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart
+++ b/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart
@@ -89,7 +89,7 @@ class _CommentInputWidgetState extends State<CommentInputWidget>
final textFieldFillColor =
isDarkMode ? const Color(0xFF212121) : const Color(0xFFF3F3F3);
final textFieldBorderColor = isDarkMode
- ? colorScheme.backgroundBase
+ ? const Color(0xFF0E0E0E)
: const Color(0xFF000000).withValues(alpha: 0.02);
return Container(
@@ -99,7 +99,9 @@ class _CommentInputWidgetState extends State<CommentInputWidget>
right: 18,
top: 20,
),
- color: colorScheme.backgroundBase,
+ color: isDarkMode
+ ? const Color(0xFF0E0E0E)
+ : colorScheme.backgroundElevated,
child: SafeArea(
top: false,
child: Container(