diff --git a/lib/app.dart b/lib/app.dart index 5770dcb52..ff60a4bfe 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -21,7 +21,6 @@ final lightThemeData = ThemeData( primaryColorLight: Colors.black54, iconTheme: IconThemeData(color: Colors.black), primaryIconTheme: IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0), - bottomAppBarColor: Color.fromRGBO(196, 196, 196, 0.6), colorScheme: ColorScheme.light( primary: Colors.black, secondary: Color.fromARGB(255, 163, 163, 163)), accentColor: Color.fromRGBO(0, 0, 0, 0.6), @@ -89,15 +88,12 @@ final darkThemeData = ThemeData( iconTheme: IconThemeData(color: Colors.white), primaryIconTheme: IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0), hintColor: Colors.grey, - bottomAppBarColor: Color.fromRGBO(255, 255, 255, 0.7), - colorScheme: ColorScheme.dark(primary: Colors.white), accentColor: Color.fromRGBO(45, 194, 98, 0.2), buttonColor: Color.fromRGBO(45, 194, 98, 1.0), buttonTheme: ButtonThemeData().copyWith( buttonColor: Color.fromRGBO(45, 194, 98, 1.0), ), - // primaryColor: Colors.red, textTheme: _buildTextTheme(Colors.white), toggleableActiveColor: Colors.green[400], outlinedButtonTheme: buildOutlinedButtonThemeData( diff --git a/lib/ente_theme_data.dart b/lib/ente_theme_data.dart index 6bdd3017a..53366be5b 100644 --- a/lib/ente_theme_data.dart +++ b/lib/ente_theme_data.dart @@ -45,7 +45,7 @@ extension CustomColorScheme on ColorScheme { Color get cancelSelectedButtonColor => brightness == Brightness.light ? Color.fromRGBO(0, 0, 0, 0.35) - : Color.fromRGBO(16, 16, 16, 0.5); + : Color.fromRGBO(48, 48, 48, 0.5); Color get bgColorForQuestions => brightness == Brightness.light ? Colors.white @@ -66,6 +66,34 @@ extension CustomColorScheme on ColorScheme { backgroundColor: Colors.black, itemStyle: TextStyle(color: Colors.white), cancelStyle: TextStyle(color: Colors.white)); + + Color get stepProgressUnselectedColor => brightness == Brightness.light + ? Color.fromRGBO(196, 196, 196, 0.6) + : Color.fromRGBO(255, 255, 255, 0.7); + + Color get gNavBackgroundColor => brightness == Brightness.light + ? Color.fromRGBO(196, 196, 196, 0.6) + : 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/app_update_dialog.dart b/lib/ui/app_update_dialog.dart index e1b74f9ce..30b16db13 100644 --- a/lib/ui/app_update_dialog.dart +++ b/lib/ui/app_update_dialog.dart @@ -49,7 +49,6 @@ class _AppUpdateDialogState extends State { Container( width: double.infinity, height: 64, - padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), child: OutlinedButton( child: Text( "Update", diff --git a/lib/ui/backup_folder_selection_page.dart b/lib/ui/backup_folder_selection_page.dart index 01c365819..8e614556d 100644 --- a/lib/ui/backup_folder_selection_page.dart +++ b/lib/ui/backup_folder_selection_page.dart @@ -64,6 +64,7 @@ class _BackupFolderSelectionPageState extends State { appBar: widget.shouldSelectAll ? null : AppBar( + elevation: 0, title: Text(""), ), body: Column( diff --git a/lib/ui/collection_page.dart b/lib/ui/collection_page.dart index 999adfd75..d997627b6 100644 --- a/lib/ui/collection_page.dart +++ b/lib/ui/collection_page.dart @@ -6,7 +6,6 @@ import 'package:photos/events/files_updated_event.dart'; import 'package:photos/models/collection_items.dart'; import 'package:photos/models/galleryType.dart'; import 'package:photos/models/selected_files.dart'; -import 'package:photos/ui/common/bottomShadow.dart'; import 'package:photos/ui/gallery.dart'; import 'package:photos/ui/gallery_app_bar_widget.dart'; import 'package:photos/ui/gallery_overlay_widget.dart'; @@ -46,6 +45,7 @@ class CollectionPage extends StatelessWidget { initialFiles: initialFiles, smallerTodayFont: true, albumName: c.collection.name, + footer: const SizedBox(height: 32), ); return Scaffold( appBar: PreferredSize( @@ -57,12 +57,10 @@ class CollectionPage extends StatelessWidget { collection: c.collection, ), ), - // body: gallery, body: Stack( alignment: Alignment.bottomCenter, children: [ gallery, - BottomShadowWidget(), GalleryOverlayWidget( overlayType, _selectedFiles, diff --git a/lib/ui/common/dynamicFAB.dart b/lib/ui/common/dynamicFAB.dart index e2ce062d6..6575a7942 100644 --- a/lib/ui/common/dynamicFAB.dart +++ b/lib/ui/common/dynamicFAB.dart @@ -9,16 +9,17 @@ class DynamicFAB extends StatelessWidget { final String buttonText; final Function onPressedFunction; - const DynamicFAB( - {this.isKeypadOpen, + DynamicFAB( + {Key key, + this.isKeypadOpen, this.buttonText, this.isFormValid, - this.onPressedFunction}); + this.onPressedFunction}) + : super(key: key); @override Widget build(BuildContext context) { if (isKeypadOpen) { - //var here return Container( decoration: BoxDecoration( boxShadow: [ @@ -41,7 +42,7 @@ class DynamicFAB extends StatelessWidget { foregroundColor: Theme.of(context).colorScheme.dynamicFABTextColor, child: Transform.rotate( - angle: isFormValid ? 0 : math.pi / 2, //var here + angle: isFormValid ? 0 : math.pi / 2, child: Icon( Icons.chevron_right, size: 36, diff --git a/lib/ui/deduplicate_page.dart b/lib/ui/deduplicate_page.dart index e8b4d9a45..d5cf923ad 100644 --- a/lib/ui/deduplicate_page.dart +++ b/lib/ui/deduplicate_page.dart @@ -86,6 +86,7 @@ class _DeduplicatePageState extends State { _sortDuplicates(); return Scaffold( appBar: AppBar( + elevation: 0, title: Hero( tag: "deduplicate", child: Material( diff --git a/lib/ui/detail_page.dart b/lib/ui/detail_page.dart index 88f93b055..0cf4e4a08 100644 --- a/lib/ui/detail_page.dart +++ b/lib/ui/detail_page.dart @@ -100,34 +100,31 @@ class _DetailPageState extends State { " files ."); _appBarKey = GlobalKey(); _bottomBarKey = GlobalKey(); - return SafeArea( - bottom: false, - child: Scaffold( - appBar: FadingAppBar( - _files[_selectedIndex], - _onFileDeleted, - Configuration.instance.getUserID(), - 100, - widget.config.mode == DetailPageMode.full, - key: _appBarKey, - ), - extendBodyBehindAppBar: true, - body: Center( - child: Stack( - children: [ - _buildPageView(), - FadingBottomBar( - _files[_selectedIndex], - _onEditFileRequested, - widget.config.mode == DetailPageMode.minimalistic, - key: _bottomBarKey, - ), - ], - ), - ), - - // backgroundColor: Theme.of(context).colorScheme.onPrimary, + return Scaffold( + appBar: FadingAppBar( + _files[_selectedIndex], + _onFileDeleted, + Configuration.instance.getUserID(), + 100, + widget.config.mode == DetailPageMode.full, + key: _appBarKey, ), + extendBodyBehindAppBar: true, + body: Center( + child: Stack( + children: [ + _buildPageView(), + FadingBottomBar( + _files[_selectedIndex], + _onEditFileRequested, + widget.config.mode == DetailPageMode.minimalistic, + key: _bottomBarKey, + ), + ], + ), + ), + + // backgroundColor: Theme.of(context).colorScheme.onPrimary, ); } diff --git a/lib/ui/email_entry_page.dart b/lib/ui/email_entry_page.dart index 286c2813e..984d3b39b 100644 --- a/lib/ui/email_entry_page.dart +++ b/lib/ui/email_entry_page.dart @@ -8,6 +8,7 @@ import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:password_strength/password_strength.dart'; import 'package:photos/core/configuration.dart'; +import 'package:photos/ente_theme_data.dart'; import 'package:photos/models/billing_plan.dart'; import 'package:photos/services/billing_service.dart'; import 'package:photos/services/user_service.dart'; @@ -67,7 +68,7 @@ class _EmailEntryPageState extends State { @override Widget build(BuildContext context) { - final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0; + final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125; FloatingActionButtonLocation fabLocation() { if (isKeypadOpen) { @@ -95,7 +96,8 @@ class _EmailEntryPageState extends State { currentStep: 1, selectedColor: Theme.of(context).buttonColor, roundedEdges: Radius.circular(10), - unselectedColor: Theme.of(context).bottomAppBarColor, + unselectedColor: + Theme.of(context).colorScheme.stepProgressUnselectedColor, )), ), ); diff --git a/lib/ui/fading_app_bar.dart b/lib/ui/fading_app_bar.dart index 36d5eb3ed..ccef2ef01 100644 --- a/lib/ui/fading_app_bar.dart +++ b/lib/ui/fading_app_bar.dart @@ -68,7 +68,10 @@ class FadingAppBarState extends State { stops: const [0, 0.2, 1], ), ), - child: _buildAppBar(), + child: Padding( + padding: const EdgeInsets.only(top: 10), + child: _buildAppBar(), + ), ), opacity: _shouldHide ? 0 : 1, duration: Duration(milliseconds: 150), @@ -237,11 +240,15 @@ class FadingAppBarState extends State { return hasError ? oldValue : isLiked; }, likeBuilder: (isLiked) { - return Icon( - Icons.favorite_border, - color: - isLiked ? Colors.pinkAccent : Colors.white, //same for both themes - size: 24, + return Padding( + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.favorite_border, + color: isLiked + ? Colors.pinkAccent + : Colors.white, //same for both themes + size: 24, + ), ); }, ); diff --git a/lib/ui/fading_bottom_bar.dart b/lib/ui/fading_bottom_bar.dart index 414414a5e..adf45201e 100644 --- a/lib/ui/fading_bottom_bar.dart +++ b/lib/ui/fading_bottom_bar.dart @@ -151,30 +151,32 @@ class FadingBottomBarState extends State { ), ); } - return AnimatedOpacity( - child: Align( - alignment: Alignment.bottomCenter, - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Colors.transparent, - Colors.black.withOpacity(0.6), - Colors.black.withOpacity(0.72), - ], - stops: const [0, 0.8, 1], + return SafeArea( + child: AnimatedOpacity( + child: Align( + alignment: Alignment.bottomCenter, + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Colors.transparent, + Colors.black.withOpacity(0.6), + Colors.black.withOpacity(0.72), + ], + stops: const [0, 0.8, 1], + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: children, ), ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: children, - ), ), + opacity: _shouldHide ? 0 : 1, + duration: Duration(milliseconds: 150), ), - opacity: _shouldHide ? 0 : 1, - duration: Duration(milliseconds: 150), ); } diff --git a/lib/ui/free_space_page.dart b/lib/ui/free_space_page.dart index 49404161e..c7c01b097 100644 --- a/lib/ui/free_space_page.dart +++ b/lib/ui/free_space_page.dart @@ -20,6 +20,7 @@ class _FreeSpacePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + elevation: 0, title: Hero( tag: "free_up_space", child: Material( 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/gallery_footer_widget.dart b/lib/ui/gallery_footer_widget.dart index 421682564..3bb27bf3c 100644 --- a/lib/ui/gallery_footer_widget.dart +++ b/lib/ui/gallery_footer_widget.dart @@ -17,7 +17,6 @@ class GalleryFooterWidget extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, - //mainAxisSize: MainAxisSize.min, children: [ Icon( Icons.cloud_upload_outlined, diff --git a/lib/ui/gallery_overlay_widget.dart b/lib/ui/gallery_overlay_widget.dart index 98009103d..fb1eff8d1 100644 --- a/lib/ui/gallery_overlay_widget.dart +++ b/lib/ui/gallery_overlay_widget.dart @@ -15,6 +15,7 @@ import 'package:photos/models/galleryType.dart'; import 'package:photos/models/magic_metadata.dart'; import 'package:photos/models/selected_files.dart'; import 'package:photos/services/collections_service.dart'; +import 'package:photos/ui/common/bottomShadow.dart'; import 'package:photos/ui/common/onlyOuterShadow.dart'; import 'package:photos/ui/create_collection_page.dart'; import 'package:photos/utils/delete_file_util.dart'; @@ -219,6 +220,9 @@ class _OverlayWidgetState extends State { ), ], ), + BottomShadowWidget( + offsetDy: 40, + ), ], ), ); diff --git a/lib/ui/home_widget.dart b/lib/ui/home_widget.dart index 234247436..ce1476c96 100644 --- a/lib/ui/home_widget.dart +++ b/lib/ui/home_widget.dart @@ -592,25 +592,33 @@ class _HomeBottomNavigationBarState extends State { filter: ImageFilter.blur(sigmaX: 20, sigmaY: 20), child: GNav( curve: Curves.easeOutExpo, - // backgroundColor: Colors.white.withOpacity(0.6), - backgroundColor: - Theme.of(context).bottomAppBarColor, + backgroundColor: Theme.of(context) + .colorScheme + .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/log_file_viewer.dart b/lib/ui/log_file_viewer.dart index 4af2a6f1a..da64d7141 100644 --- a/lib/ui/log_file_viewer.dart +++ b/lib/ui/log_file_viewer.dart @@ -28,6 +28,7 @@ class _LogFileViewerState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + elevation: 0, title: Text("today's logs"), ), body: _getBody(), diff --git a/lib/ui/login_page.dart b/lib/ui/login_page.dart index 2c3a6e541..8557b5e7e 100644 --- a/lib/ui/login_page.dart +++ b/lib/ui/login_page.dart @@ -29,7 +29,7 @@ class _LoginPageState extends State { @override Widget build(BuildContext context) { - final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0; + final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125; FloatingActionButtonLocation fabLocation() { if (isKeypadOpen) { 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/ott_verification_page.dart b/lib/ui/ott_verification_page.dart index c72854d72..bb156ce55 100644 --- a/lib/ui/ott_verification_page.dart +++ b/lib/ui/ott_verification_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:photos/ente_theme_data.dart'; import 'package:photos/services/user_service.dart'; import 'package:photos/ui/common/dynamicFAB.dart'; import 'package:step_progress_indicator/step_progress_indicator.dart'; @@ -25,7 +26,7 @@ class _OTTVerificationPageState extends State { @override Widget build(BuildContext context) { - final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0; + final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125; FloatingActionButtonLocation fabLocation() { if (isKeypadOpen) { @@ -49,14 +50,17 @@ class _OTTVerificationPageState extends State { ? Hero( tag: "sign_up", child: Material( - type: MaterialType.transparency, - child: StepProgressIndicator( - totalSteps: 4, - currentStep: 2, - selectedColor: Theme.of(context).buttonColor, - roundedEdges: Radius.circular(10), - unselectedColor: Theme.of(context).bottomAppBarColor, - )), + type: MaterialType.transparency, + child: StepProgressIndicator( + totalSteps: 4, + currentStep: 2, + selectedColor: Theme.of(context).buttonColor, + roundedEdges: Radius.circular(10), + unselectedColor: Theme.of(context) + .colorScheme + .stepProgressUnselectedColor, + ), + ), ) : null, ), diff --git a/lib/ui/password_entry_page.dart b/lib/ui/password_entry_page.dart index a1d175958..badb24e06 100644 --- a/lib/ui/password_entry_page.dart +++ b/lib/ui/password_entry_page.dart @@ -75,7 +75,7 @@ class _PasswordEntryPageState extends State { @override Widget build(BuildContext context) { - final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0; + final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125; FloatingActionButtonLocation fabLocation() { if (isKeypadOpen) { diff --git a/lib/ui/password_reentry_page.dart b/lib/ui/password_reentry_page.dart index da9ae5d3e..2678b76c6 100644 --- a/lib/ui/password_reentry_page.dart +++ b/lib/ui/password_reentry_page.dart @@ -32,7 +32,7 @@ class _PasswordReentryPageState extends State { @override Widget build(BuildContext context) { - final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom != 0; + final isKeypadOpen = MediaQuery.of(context).viewInsets.bottom > 125; FloatingActionButtonLocation fabLocation() { if (isKeypadOpen) { diff --git a/lib/ui/payment/stripe_subscription_page.dart b/lib/ui/payment/stripe_subscription_page.dart index 9461a8ca2..010bae612 100644 --- a/lib/ui/payment/stripe_subscription_page.dart +++ b/lib/ui/payment/stripe_subscription_page.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:logging/logging.dart'; +import 'package:photos/ente_theme_data.dart'; import 'package:photos/models/billing_plan.dart'; import 'package:photos/models/subscription.dart'; import 'package:photos/models/user_details.dart'; @@ -132,7 +133,9 @@ class _StripeSubscriptionPageState extends State { currentStep: 4, selectedColor: Theme.of(context).buttonColor, roundedEdges: Radius.circular(10), - unselectedColor: Theme.of(context).bottomAppBarColor, + unselectedColor: Theme.of(context) + .colorScheme + .stepProgressUnselectedColor, )), ) : AppBar( diff --git a/lib/ui/recovery_key_page.dart b/lib/ui/recovery_key_page.dart index 1dfad0457..59ff4ca92 100644 --- a/lib/ui/recovery_key_page.dart +++ b/lib/ui/recovery_key_page.dart @@ -61,12 +61,14 @@ class _RecoveryKeyPageState extends State { currentStep: 3, selectedColor: Theme.of(context).buttonColor, roundedEdges: Radius.circular(10), - unselectedColor: Theme.of(context).bottomAppBarColor, + unselectedColor: + Theme.of(context).colorScheme.stepProgressUnselectedColor, ), ), ) : widget.showAppBar ? AppBar( + elevation: 0, title: Text(widget.title ?? "Recovery key"), ) : null, diff --git a/lib/ui/sessions_page.dart b/lib/ui/sessions_page.dart index 819a45973..e608e3dcc 100644 --- a/lib/ui/sessions_page.dart +++ b/lib/ui/sessions_page.dart @@ -30,6 +30,7 @@ class _SessionsPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + elevation: 0, title: Text("Active sessions"), ), body: _getBody(), diff --git a/lib/ui/settings/backup_section_widget.dart b/lib/ui/settings/backup_section_widget.dart index 7831cc2c7..7bc0707f9 100644 --- a/lib/ui/settings/backup_section_widget.dart +++ b/lib/ui/settings/backup_section_widget.dart @@ -55,7 +55,7 @@ class BackupSectionWidgetState extends State { ), SectionOptionDivider, SizedBox( - height: 36, + height: 48, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -75,7 +75,7 @@ class BackupSectionWidgetState extends State { ), SectionOptionDivider, SizedBox( - height: 36, + height: 48, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/ui/settings/security_section_widget.dart b/lib/ui/settings/security_section_widget.dart index c2a79e222..d750c7661 100644 --- a/lib/ui/settings/security_section_widget.dart +++ b/lib/ui/settings/security_section_widget.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_windowmanager/flutter_windowmanager.dart'; import 'package:photos/core/configuration.dart'; import 'package:photos/core/event_bus.dart'; +import 'package:photos/ente_theme_data.dart'; import 'package:photos/events/two_factor_status_change_event.dart'; import 'package:photos/services/user_service.dart'; import 'package:photos/ui/app_lock.dart'; @@ -66,7 +67,7 @@ class _SecuritySectionWidgetState extends State { [ Padding(padding: EdgeInsets.all(2)), SizedBox( - height: 36, + height: 48, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -116,7 +117,7 @@ class _SecuritySectionWidgetState extends State { children.addAll([ SectionOptionDivider, SizedBox( - height: 36, + height: 48, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -149,7 +150,7 @@ class _SecuritySectionWidgetState extends State { [ SectionOptionDivider, SizedBox( - height: 36, + height: 48, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -167,14 +168,14 @@ class _SecuritySectionWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: const [ Text( - "hiding from the task switcher will prevent you from taking screenshots in this app.", + "Hiding from the task switcher will prevent you from taking screenshots in this app.", style: TextStyle( height: 1.5, ), ), Padding(padding: EdgeInsets.all(8)), Text( - "are you sure?", + "Are you sure?", style: TextStyle( height: 1.5, ), @@ -184,17 +185,27 @@ class _SecuritySectionWidgetState extends State { ), actions: [ TextButton( - child: Text("no", - style: TextStyle(color: Colors.white)), + child: Text( + "No", + style: TextStyle( + color: Theme.of(context) + .colorScheme + .defaultTextColor), + ), onPressed: () { Navigator.of(context, rootNavigator: true) .pop('dialog'); }, ), TextButton( - child: Text("yes", - style: TextStyle( - color: Colors.white.withOpacity(0.8))), + child: Text( + "Yes", + style: TextStyle( + color: Theme.of(context) + .colorScheme + .defaultTextColor, + ), + ), onPressed: () async { Navigator.of(context, rootNavigator: true) .pop('dialog'); diff --git a/lib/ui/settings/social_section_widget.dart b/lib/ui/settings/social_section_widget.dart index fd7774057..f8e81091b 100644 --- a/lib/ui/settings/social_section_widget.dart +++ b/lib/ui/settings/social_section_widget.dart @@ -50,7 +50,6 @@ class SocialSectionWidget extends StatelessWidget { !UpdateService.instance.isIndependent() ? Column( children: [ - Divider(height: 4), GestureDetector( behavior: HitTestBehavior.translucent, onTap: () { 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/ui/two_factor_setup_page.dart b/lib/ui/two_factor_setup_page.dart index 17b80864b..0a9a5b44c 100644 --- a/lib/ui/two_factor_setup_page.dart +++ b/lib/ui/two_factor_setup_page.dart @@ -66,6 +66,7 @@ class _TwoFactorSetupPageState extends State Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + elevation: 0, title: Text( "Two-factor setup", ), 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), diff --git a/lib/utils/email_util.dart b/lib/utils/email_util.dart index f67414d8d..7e3f11b54 100644 --- a/lib/utils/email_util.dart +++ b/lib/utils/email_util.dart @@ -4,11 +4,11 @@ import 'package:archive/archive_io.dart'; import 'package:email_validator/email_validator.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_email_sender/flutter_email_sender.dart'; import 'package:logging/logging.dart'; import 'package:path_provider/path_provider.dart'; import 'package:photos/core/error-reporting/super_logging.dart'; +import 'package:photos/ente_theme_data.dart'; import 'package:photos/ui/common/dialogs.dart'; import 'package:photos/ui/log_file_viewer.dart'; import 'package:photos/utils/dialog_util.dart'; @@ -35,19 +35,20 @@ Future sendLogs( children: [ Icon( Icons.feed_outlined, - color: Colors.white.withOpacity(0.85), + color: Theme.of(context).iconTheme.color.withOpacity(0.85), ), Padding(padding: EdgeInsets.all(4)), Text( "View logs", style: TextStyle( - color: Colors.white.withOpacity(0.85), - ), + color: Theme.of(context) + .colorScheme + .defaultTextColor + .withOpacity(0.85)), ), ], ), onPressed: () async { - // routeToPage(context, LogFileViewer(SuperLogging.logFile)); showDialog( context: context, builder: (BuildContext context) { @@ -81,7 +82,6 @@ Future sendLogs( "This will send across logs and metrics that will help us debug your issue better", style: TextStyle( height: 1.5, - fontFamily: 'Ubuntu', fontSize: 16, ), ),