diff --git a/lib/app.dart b/lib/app.dart index 5770dcb52f3ef9a04baf98b5a07029b0a6ed7f3b..ff60a4bfe9b4b76d709521385a720ede416e6214 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 6bdd3017a99f0a723fa77869334ed8d763215ffb..53366be5be970ea572d254b2c8e8c1ed13e1f82f 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 e1b74f9ce1e11fbbbfeec4d0507fbccf0e09ecbe..30b16db13f185994e1be785a36f69c1c537a32f6 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 01c3658194ab7d9fe106dba642dcbc8a70ef9b58..8e614556d78b365d350a4bd6204dd8df21e8543d 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 999adfd759572d96afcd84e4bdc723ab6b3bee59..d997627b6bc2ae2f7ece5008bab88770793456f8 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 e2ce062d6b23100d3562b9fb6d421bdaf8f9a854..6575a79427dab317546fd00cbf7bbcba15ba7b8e 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 e8b4d9a451ef7c793d451a1e2717ff7a2c13d3ac..d5cf923ad6f67d36f43ecc84520e85c700df7bcd 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 88f93b05566fecff880f32b83028ecd6204e9d70..0cf4e4a084194484ad017d141bac2504234585f0 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, - ), - ], - ), + 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, ), + + // backgroundColor: Theme.of(context).colorScheme.onPrimary, ); } diff --git a/lib/ui/email_entry_page.dart b/lib/ui/email_entry_page.dart index 286c2813e89137a39f8b1910f21411afd93718ec..984d3b39be32df94b2c0a999d934045b596107a9 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 36d5eb3ed83e1d942de73a0cb34b4642c9452964..ccef2ef01749c2b17286d45eca646045e1d24467 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 414414a5e25ebe27322eaca4ab46c0cb23ed287f..adf45201e023a133e2344049f635bf007af59de9 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 49404161e6a2cea971fe767a0517dc811fb79a8e..c7c01b09787bb1c02642b7b306556986509d74ad 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 0966227deac4e3d38cee028eb0f6725f8e375d4b..9573eae6b79783440a6738b964f9a9318387d6b4 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 4216825645df7f8c8d84bc5e380dab4f442b679d..3bb27bf3cdfd2c9400286b8a2dda2ebc7935056c 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 98009103d16ad3d874ea9719be792ee597a3bf5e..fb1eff8d17a44b85fbc4f8356c8241f00f5f3104 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 234247436396797d192f4d170cba2690c65e90ed..ce1476c9688fece31a32bbe484e8869fade3afbe 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 a0a54f7a2c662d1e0d988a9032cae40979b221da..345bae80f966d5f4e13186a81945f0a7110f3f2f 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 4af2a6f1aa982904ce8723258397a5f3e7a903a1..da64d7141f3254902b9e6c16d43b4cd71d1bc80f 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 2c3a6e541bc8c04e7e3d1047568a199c9f402c28..8557b5e7ec41e49c8151416605b7d94d5f33fcef 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 8dc288aa7e8fcc208313d3864cd388f5f1753bd4..61292e901a16af8f8d78913dc1a3a54cca62666f 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 c72854d727dc36ff94a4be50301eb99dd37be5b0..bb156ce558162fa2bb67005fe9d8bcd5177f755e 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 a1d175958fdcde36482a2e2a91296e84d37790dc..badb24e06205b6d8d4b043e0e5045442bb4f8103 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 da9ae5d3ed5e26c3a5cf7dde3156a58f28287584..2678b76c671af3bcf9ad7fc87198d07302ab8807 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 9461a8ca241aca099f8af12cc89cd5435fccfb32..010bae6129dcbd8ede7435c1c7fb7a8544849b8a 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 1dfad045786ba37fbfef5913617e580ae81ce451..59ff4ca9276699e72fe607148ac3c5219976bbd7 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 819a459735dce03361b1818ef2b7b246299ded57..e608e3dcc942ea36855b9925780d6592ce2aef31 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 7831cc2c738cdb176b960a64c85d8d24172ee92d..7bc0707f907fd4c5ce2db80aab3a3ee37da27e61 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 c2a79e222d045489ba265862a319d85cf0c29fbb..d750c7661ad3c22d6b7ba6284a37674be3d66380 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 fd777405773b9f0517aaac7b8d434d048c107a09..f8e81091b9f54d3de753927a118c92e70b476482 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 c30d573f834ababdfd454dcb3bea144aefe2cfd3..a953af1a1ac4370793492d431d4043cf12a67965 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 17b80864bd95c3cb117fe9fd494e8d037292e359..0a9a5b44c42bf07adf73668059fb32c4bfe1c503 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 0f8996ec2befd3f0dc347367de8220d148e4af70..a26f12b95f39bc9e3464ce48b30a6354e30bec55 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 f67414d8d15cee17104105936ee562cd876427e2..7e3f11b54eaa8d3d1909cba4e4ce4ac9fce7b1b3 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, ), ),