diff --git a/lib/ente_theme_data.dart b/lib/ente_theme_data.dart index a52a2e2bc..ae578aba0 100644 --- a/lib/ente_theme_data.dart +++ b/lib/ente_theme_data.dart @@ -22,9 +22,10 @@ extension CustomColorScheme on ColorScheme { // todo: use brightness == Brightness.light for changing color for dark/light theme ButtonStyle get optionalActionButtonStyle => buildElevatedButtonThemeData( - onPrimary: Colors.black87, - primary: Color.fromRGBO(240, 240, 240, 1), - ).style; + onPrimary: Color(0xFF777777), + primary: Color(0xFFF0F0F0), + elevation: 0) + .style; } OutlinedButtonThemeData buildOutlinedButtonThemeData( @@ -65,10 +66,12 @@ OutlinedButtonThemeData buildOutlinedButtonThemeData( ElevatedButtonThemeData buildElevatedButtonThemeData( {@required Color onPrimary, // text button color - @required Color primary // background color of button + @required Color primary, + double elevation = 2 // background color of button }) { return ElevatedButtonThemeData( style: ElevatedButton.styleFrom( + elevation: elevation, onPrimary: onPrimary, primary: primary, alignment: Alignment.center, @@ -77,7 +80,7 @@ ElevatedButtonThemeData buildElevatedButtonThemeData( fontFamily: 'Inter-SemiBold', fontSize: 18, ), - padding: EdgeInsets.symmetric(vertical: 14), + padding: EdgeInsets.symmetric(vertical: 18), shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(8)), ), diff --git a/lib/ui/common/fabCreateAccount.dart b/lib/ui/common/dynamicFAB.dart similarity index 96% rename from lib/ui/common/fabCreateAccount.dart rename to lib/ui/common/dynamicFAB.dart index 99d8e7c99..d31f533bc 100644 --- a/lib/ui/common/fabCreateAccount.dart +++ b/lib/ui/common/dynamicFAB.dart @@ -3,13 +3,13 @@ import 'dart:math' as math; import 'package:flutter/material.dart'; import 'package:photos/ente_theme_data.dart'; -class FABCreateAccount extends StatelessWidget { +class DynamicFAB extends StatelessWidget { final bool isKeypadOpen; final bool isFormValid; final String buttonText; final Function onPressedFunction; - const FABCreateAccount( + const DynamicFAB( {this.isKeypadOpen, this.buttonText, this.isFormValid, diff --git a/lib/ui/common/gradientButton.dart b/lib/ui/common/gradientButton.dart index 62d97a1b6..e65a5df7e 100644 --- a/lib/ui/common/gradientButton.dart +++ b/lib/ui/common/gradientButton.dart @@ -6,7 +6,8 @@ class GradientButton extends StatelessWidget { final List linearGradientColors; final Function onTap; - GradientButton({this.child, this.linearGradientColors, this.onTap}); + GradientButton({Key key, this.child, this.linearGradientColors, this.onTap}) + : super(key: key); @override Widget build(BuildContext context) { @@ -15,6 +16,14 @@ class GradientButton extends StatelessWidget { child: Container( height: 56, decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + spreadRadius: 0, + offset: Offset(0, 4), + color: Colors.black.withOpacity(0.2), + blurRadius: 2, + ) + ], gradient: LinearGradient( begin: Alignment(0.1, -0.9), end: Alignment(-0.6, 0.9), diff --git a/lib/ui/email_entry_page.dart b/lib/ui/email_entry_page.dart index 2c4285188..4121bb7f6 100644 --- a/lib/ui/email_entry_page.dart +++ b/lib/ui/email_entry_page.dart @@ -10,7 +10,7 @@ import 'package:photos/core/configuration.dart'; import 'package:photos/models/billing_plan.dart'; import 'package:photos/services/billing_service.dart'; import 'package:photos/services/user_service.dart'; -import 'package:photos/ui/common/fabCreateAccount.dart'; +import 'package:photos/ui/common/dynamicFAB.dart'; //import 'package:photos/ui/common/report_bug_popup.dart'; //import 'package:photos/ui/common_elements.dart'; import 'package:photos/ui/loading_widget.dart'; @@ -110,7 +110,7 @@ class _EmailEntryPageState extends State { return Scaffold( appBar: appBar, body: _getBody(), - floatingActionButton: FABCreateAccount( + floatingActionButton: DynamicFAB( isKeypadOpen: isKeypadOpen, isFormValid: _isFormValid(), buttonText: 'Create Account', diff --git a/lib/ui/home_widget.dart b/lib/ui/home_widget.dart index 3a55e2fd5..8fe226e98 100644 --- a/lib/ui/home_widget.dart +++ b/lib/ui/home_widget.dart @@ -474,13 +474,13 @@ class _HomeWidgetState extends State { width: 180, child: ClipRect( child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 20, sigmaY: 20), + filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), child: GNav( curve: Curves.easeOutExpo, backgroundColor: Theme.of(context).bottomAppBarColor, mainAxisAlignment: MainAxisAlignment.center, - rippleColor: Theme.of(context).buttonColor.withOpacity(0.20), - hoverColor: Theme.of(context).buttonColor.withOpacity(0.20), + rippleColor: Colors.white.withOpacity(0.2), + hoverColor: Colors.white.withOpacity(0.2), activeColor: Colors.black, iconSize: 24, padding: EdgeInsets.fromLTRB(16, 8, 16, 8), diff --git a/lib/ui/landing_page_widget.dart b/lib/ui/landing_page_widget.dart index b9679131f..e6d840e16 100644 --- a/lib/ui/landing_page_widget.dart +++ b/lib/ui/landing_page_widget.dart @@ -98,7 +98,7 @@ class _LandingPageWidgetState extends State { _getSignUpButton(context), Container( width: double.infinity, - padding: EdgeInsets.fromLTRB(24, 12, 24, 28), + padding: EdgeInsets.fromLTRB(20, 12, 20, 28), child: Hero( tag: "log_in", child: ElevatedButton( diff --git a/lib/ui/login_page.dart b/lib/ui/login_page.dart index ec5ef1633..e1d535b27 100644 --- a/lib/ui/login_page.dart +++ b/lib/ui/login_page.dart @@ -10,7 +10,7 @@ import 'package:photos/ui/web_page.dart'; import 'package:photos/utils/dialog_util.dart'; import 'package:photos/utils/email_util.dart'; -import 'common/fabCreateAccount.dart'; +import 'common/dynamicFAB.dart'; class LoginPage extends StatefulWidget { LoginPage({Key key}) : super(key: key); @@ -55,7 +55,7 @@ class _LoginPageState extends State { ), ), body: _getBody(), - floatingActionButton: FABCreateAccount( + floatingActionButton: DynamicFAB( isKeypadOpen: isKeypadOpen, isFormValid: _emailIsValid, buttonText: 'Log in', diff --git a/lib/ui/ott_verification_page.dart b/lib/ui/ott_verification_page.dart index 1c4f232ff..01d93e5bb 100644 --- a/lib/ui/ott_verification_page.dart +++ b/lib/ui/ott_verification_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:photos/services/user_service.dart'; -import 'package:photos/ui/common/fabCreateAccount.dart'; +import 'package:photos/ui/common/dynamicFAB.dart'; import 'package:photos/ui/common/report_bug_popup.dart'; import 'package:photos/ui/common_elements.dart'; import 'package:step_progress_indicator/step_progress_indicator.dart'; @@ -63,7 +63,7 @@ class _OTTVerificationPageState extends State { : null, ), body: _getBody(), - floatingActionButton: FABCreateAccount( + floatingActionButton: DynamicFAB( isKeypadOpen: isKeypadOpen, isFormValid: !(_verificationCodeController.text == null || _verificationCodeController.text.isEmpty), diff --git a/lib/ui/password_entry_page.dart b/lib/ui/password_entry_page.dart index 9dda647fc..c8ed90099 100644 --- a/lib/ui/password_entry_page.dart +++ b/lib/ui/password_entry_page.dart @@ -17,7 +17,7 @@ import 'package:photos/ui/web_page.dart'; import 'package:photos/utils/dialog_util.dart'; import 'package:photos/utils/toast_util.dart'; -import 'common/fabCreateAccount.dart'; +import 'common/dynamicFAB.dart'; enum PasswordEntryMode { set, @@ -114,7 +114,7 @@ class _PasswordEntryPageState extends State { elevation: 0, ), body: _getBody(title), - floatingActionButton: FABCreateAccount( + floatingActionButton: DynamicFAB( isKeypadOpen: isKeypadOpen, isFormValid: _passwordsMatch, buttonText: title, diff --git a/lib/ui/password_reentry_page.dart b/lib/ui/password_reentry_page.dart index 0948d8360..fc481a42a 100644 --- a/lib/ui/password_reentry_page.dart +++ b/lib/ui/password_reentry_page.dart @@ -7,7 +7,7 @@ import 'package:photos/events/subscription_purchased_event.dart'; import 'package:photos/ui/recovery_page.dart'; import 'package:photos/utils/dialog_util.dart'; -import 'common/fabCreateAccount.dart'; +import 'common/dynamicFAB.dart'; class PasswordReentryPage extends StatefulWidget { PasswordReentryPage({Key key}) : super(key: key); @@ -56,7 +56,7 @@ class _PasswordReentryPageState extends State { ), ), body: _getBody(), - floatingActionButton: FABCreateAccount( + floatingActionButton: DynamicFAB( isKeypadOpen: isKeypadOpen, isFormValid: _passwordController.text.isNotEmpty, buttonText: 'Log in', diff --git a/lib/ui/recovery_page.dart b/lib/ui/recovery_page.dart index a53affb38..057b9f5ba 100644 --- a/lib/ui/recovery_page.dart +++ b/lib/ui/recovery_page.dart @@ -6,7 +6,7 @@ import 'package:photos/ui/password_entry_page.dart'; import 'package:photos/utils/dialog_util.dart'; import 'package:photos/utils/toast_util.dart'; -import 'common/fabCreateAccount.dart'; +import 'common/dynamicFAB.dart'; class RecoveryPage extends StatefulWidget { const RecoveryPage({Key key}) : super(key: key); @@ -31,7 +31,7 @@ class _RecoveryPageState extends State { }, ), ), - floatingActionButton: FABCreateAccount( + floatingActionButton: DynamicFAB( isKeypadOpen: false, isFormValid: _recoveryKey.text.isNotEmpty, buttonText: 'Recover',