diff --git a/lib/ente_theme_data.dart b/lib/ente_theme_data.dart index 790012644..53366be5b 100644 --- a/lib/ente_theme_data.dart +++ b/lib/ente_theme_data.dart @@ -71,9 +71,29 @@ extension CustomColorScheme on ColorScheme { ? Color.fromRGBO(196, 196, 196, 0.6) : Color.fromRGBO(255, 255, 255, 0.7); - Color get gNavBackgoundColor => brightness == Brightness.light + Color get gNavBackgroundColor => brightness == Brightness.light ? Color.fromRGBO(196, 196, 196, 0.6) - : Color.fromRGBO(255, 255, 255, 0.7); + : Color.fromRGBO(40, 40, 40, 0.6); + + Color get gNavBarActiveColor => brightness == Brightness.light + ? Color.fromRGBO(255, 255, 255, 0.6) + : Color.fromRGBO(255, 255, 255, 0.9); + + Color get gNavIconColor => brightness == Brightness.light + ? Color.fromRGBO(0, 0, 0, 0.9) + : Color.fromRGBO(255, 255, 255, 1); + + Color get gNavActiveIconColor => brightness == Brightness.light + ? Color.fromRGBO(0, 0, 0, 0.9) + : Color.fromRGBO(0, 0, 0, 1); + + Color get galleryThumbBackgroundColor => brightness == Brightness.light + ? Color.fromRGBO(240, 240, 240, 1) + : Color.fromRGBO(20, 20, 20, 1); + + Color get galleryThumbDrawColor => brightness == Brightness.light + ? Colors.black.withOpacity(0.8) + : Colors.white.withOpacity(0.5); } OutlinedButtonThemeData buildOutlinedButtonThemeData( diff --git a/lib/ui/gallery.dart b/lib/ui/gallery.dart index 0966227de..9573eae6b 100644 --- a/lib/ui/gallery.dart +++ b/lib/ui/gallery.dart @@ -218,8 +218,9 @@ class _GalleryState extends State { return getMonthAndYear(DateTime.fromMicrosecondsSinceEpoch( _collatedFiles[index][0].creationTime)); }, - thumbBackgroundColor: Color(0xFF151515), - thumbDrawColor: Colors.white.withOpacity(0.5), + thumbBackgroundColor: + Theme.of(context).colorScheme.galleryThumbBackgroundColor, + thumbDrawColor: Theme.of(context).colorScheme.galleryThumbDrawColor, firstShown: (int firstIndex) { Bus.instance .fire(GalleryIndexUpdatedEvent(widget.tagPrefix, firstIndex)); diff --git a/lib/ui/home_widget.dart b/lib/ui/home_widget.dart index 13b257d8c..ce1476c96 100644 --- a/lib/ui/home_widget.dart +++ b/lib/ui/home_widget.dart @@ -594,23 +594,31 @@ class _HomeBottomNavigationBarState extends State { curve: Curves.easeOutExpo, backgroundColor: Theme.of(context) .colorScheme - .gNavBackgoundColor, + .gNavBackgroundColor, mainAxisAlignment: MainAxisAlignment.center, - rippleColor: Colors.white.withOpacity(0.2), - hoverColor: Colors.white.withOpacity(0.2), - activeColor: Colors.black, + rippleColor: Colors.white.withOpacity(0.1), + activeColor: Theme.of(context) + .colorScheme + .gNavBarActiveColor, iconSize: 24, padding: EdgeInsets.fromLTRB(16, 8, 16, 8), duration: Duration(milliseconds: 200), gap: 0, tabBorderRadius: 24, - tabBackgroundColor: Colors.white, + tabBackgroundColor: Theme.of(context) + .colorScheme + .gNavBarActiveColor, haptic: false, tabs: [ GButton( margin: EdgeInsets.fromLTRB(6, 6, 0, 6), icon: Icons.home, - iconColor: Colors.black, + iconColor: Theme.of(context) + .colorScheme + .gNavIconColor, + iconActiveColor: Theme.of(context) + .colorScheme + .gNavActiveIconColor, text: '', onPressed: () { _onTabChange( @@ -620,7 +628,12 @@ class _HomeBottomNavigationBarState extends State { GButton( margin: EdgeInsets.fromLTRB(0, 6, 0, 6), icon: Icons.photo_library, - iconColor: Colors.black, + iconColor: Theme.of(context) + .colorScheme + .gNavIconColor, + iconActiveColor: Theme.of(context) + .colorScheme + .gNavActiveIconColor, text: '', onPressed: () { _onTabChange( @@ -630,7 +643,12 @@ class _HomeBottomNavigationBarState extends State { GButton( margin: EdgeInsets.fromLTRB(0, 6, 0, 6), icon: Icons.folder_shared, - iconColor: Colors.black, + iconColor: Theme.of(context) + .colorScheme + .gNavIconColor, + iconActiveColor: Theme.of(context) + .colorScheme + .gNavActiveIconColor, text: '', onPressed: () { _onTabChange( @@ -640,7 +658,12 @@ class _HomeBottomNavigationBarState extends State { GButton( margin: EdgeInsets.fromLTRB(0, 6, 6, 6), icon: Icons.person, - iconColor: Colors.black, + iconColor: Theme.of(context) + .colorScheme + .gNavIconColor, + iconActiveColor: Theme.of(context) + .colorScheme + .gNavActiveIconColor, text: '', onPressed: () { _onTabChange( diff --git a/lib/ui/huge_listview/scroll_bar_thumb.dart b/lib/ui/huge_listview/scroll_bar_thumb.dart index a0a54f7a2..345bae80f 100644 --- a/lib/ui/huge_listview/scroll_bar_thumb.dart +++ b/lib/ui/huge_listview/scroll_bar_thumb.dart @@ -40,7 +40,7 @@ class ScrollBarThumb extends StatelessWidget { child: Text( title, style: TextStyle( - color: Colors.white, + color: drawColor, fontWeight: FontWeight.bold, backgroundColor: Colors.transparent, fontSize: 14, diff --git a/lib/ui/memories_widget.dart b/lib/ui/memories_widget.dart index 8dc288aa7..61292e901 100644 --- a/lib/ui/memories_widget.dart +++ b/lib/ui/memories_widget.dart @@ -99,7 +99,7 @@ class _MemoryWidgetState extends State { setState(() {}); }, child: SizedBox( - width: 100, + width: 92, height: 100, child: Padding( padding: const EdgeInsets.all(8.0), diff --git a/lib/ui/thumbnail_widget.dart b/lib/ui/thumbnail_widget.dart index c30d573f8..a953af1a1 100644 --- a/lib/ui/thumbnail_widget.dart +++ b/lib/ui/thumbnail_widget.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:logging/logging.dart'; import 'package:photos/core/cache/thumbnail_cache.dart'; import 'package:photos/core/constants.dart'; @@ -126,9 +125,14 @@ class _ThumbnailWidgetState extends State { ), ); - static final Widget loadingWidget = Container( + static final Widget lightLoadWidget = Container( alignment: Alignment.center, - color: Colors.grey[900], + color: Color.fromRGBO(240, 240, 240, 1), + ); + + static final Widget darkLoadWidget = Container( + alignment: Alignment.center, + color: Color.fromRGBO(20, 20, 20, 1), ); bool _hasLoadedThumbnail = false; @@ -201,7 +205,7 @@ class _ThumbnailWidgetState extends State { } } List viewChildrens = [ - loadingWidget, + _getLoadingWidget(), AnimatedOpacity( opacity: content == null ? 0 : 1.0, duration: Duration(milliseconds: 200), @@ -347,4 +351,10 @@ class _ThumbnailWidgetState extends State { _errorLoadingRemoteThumbnail = false; _imageProvider = null; } + + Widget _getLoadingWidget() { + return Theme.of(context).brightness == Brightness.light + ? lightLoadWidget + : darkLoadWidget; + } } diff --git a/lib/utils/date_time_util.dart b/lib/utils/date_time_util.dart index 0f8996ec2..a26f12b95 100644 --- a/lib/utils/date_time_util.dart +++ b/lib/utils/date_time_util.dart @@ -166,7 +166,7 @@ bool isLeapYear(DateTime dateTime) { Widget getDayWidget( BuildContext context, int timestamp, bool smallerTodayFont) { return Container( - padding: const EdgeInsets.fromLTRB(12, 14, 0, 12), + padding: const EdgeInsets.fromLTRB(4, 14, 0, 8), alignment: Alignment.centerLeft, child: Text( getDayTitle(timestamp),