diff --git a/lib/ente_theme_data.dart b/lib/ente_theme_data.dart index f7c3addede15c34ffeba4faf40bedb622c96edd7..a52a2e2bc2f92da019bd1f909b50dc26a8e6419b 100644 --- a/lib/ente_theme_data.dart +++ b/lib/ente_theme_data.dart @@ -83,3 +83,12 @@ ElevatedButtonThemeData buildElevatedButtonThemeData( ), )); } + +TextStyle gradientButtonTextTheme() { + return TextStyle( + color: Colors.white, + fontWeight: FontWeight.w600, + fontFamily: 'Inter-SemiBold', + fontSize: 18, + ); +} diff --git a/lib/ui/common/gradientButton.dart b/lib/ui/common/gradientButton.dart index 85d35b792bbd6b87a085532434eb52fe0126ffc8..62d97a1b61764f30a02ec9f27b3cb4242b7574cb 100644 --- a/lib/ui/common/gradientButton.dart +++ b/lib/ui/common/gradientButton.dart @@ -22,7 +22,7 @@ class GradientButton extends StatelessWidget { ), borderRadius: BorderRadius.circular(8), ), - child: child, + child: Center(child: child), ), ); } diff --git a/lib/ui/gallery_footer_widget.dart b/lib/ui/gallery_footer_widget.dart index 6f52e108f06b54636c8f788ea88f0694c4a717c5..3bbffd6d1c175a644b4352fcb72a4f334f8b57e0 100644 --- a/lib/ui/gallery_footer_widget.dart +++ b/lib/ui/gallery_footer_widget.dart @@ -26,11 +26,10 @@ class GalleryFooterWidget extends StatelessWidget { color: Colors.white, ), Padding(padding: EdgeInsets.all(6)), - Text("Preserve more", - style: Theme.of(context) - .textTheme - .headline6 - .copyWith(color: Colors.white)), + Text( + "Preserve more", + style: gradientButtonTextTheme(), + ), ], ), linearGradientColors: const [ diff --git a/lib/ui/landing_page_widget.dart b/lib/ui/landing_page_widget.dart index cdbcab06a54eb1791b484e9f3d40e8839ffa2b4d..b9679131fc85bb9bb359405da32dd05a5895279f 100644 --- a/lib/ui/landing_page_widget.dart +++ b/lib/ui/landing_page_widget.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:photos/core/configuration.dart'; import 'package:photos/ente_theme_data.dart'; +import 'package:photos/ui/common/gradientButton.dart'; import 'package:photos/ui/email_entry_page.dart'; import 'package:photos/ui/login_page.dart'; import 'package:photos/ui/password_entry_page.dart'; @@ -122,16 +123,34 @@ class _LandingPageWidgetState extends State { Widget _getSignUpButton(BuildContext context) { return Container( width: double.infinity, - padding: EdgeInsets.symmetric(horizontal: 24), - child: ElevatedButton( - style: Theme.of(context).colorScheme.primaryActionButtonStyle, + padding: EdgeInsets.symmetric(horizontal: 20), + child: GradientButton( child: Hero( tag: "sign_up", - child: Text("New to ente"), + child: Text( + "New to ente", + style: gradientButtonTextTheme(), + ), ), - onPressed: _navigateToSignUpPage, + linearGradientColors: const [ + Color(0xFF2CD267), + Color(0xFF1DB954), + ], + onTap: _navigateToSignUpPage, ), ); + // return Container( + // width: double.infinity, + // padding: EdgeInsets.symmetric(horizontal: 24), + // child: ElevatedButton( + // style: Theme.of(context).colorScheme.primaryActionButtonStyle, + // child: Hero( + // tag: "sign_up", + // child: Text("New to ente"), + // ), + // onPressed: _navigateToSignUpPage, + // ), + //); } Widget _getFeatureSlider() { diff --git a/lib/ui/recovery_key_page.dart b/lib/ui/recovery_key_page.dart index f378af89d4224900ea7e22801ffbe48edf3a2a80..72f363cf9a8c4859f80a77c343c93dcc0324cb3d 100644 --- a/lib/ui/recovery_key_page.dart +++ b/lib/ui/recovery_key_page.dart @@ -8,6 +8,7 @@ import 'package:flutter/services.dart'; import 'package:photos/core/configuration.dart'; import 'package:photos/core/constants.dart'; import 'package:photos/ente_theme_data.dart'; +import 'package:photos/ui/common/gradientButton.dart'; import 'package:photos/utils/toast_util.dart'; import 'package:share_plus/share_plus.dart'; @@ -162,10 +163,16 @@ class _RecoveryKeyPageState extends State { childrens.add(SizedBox(height: 10)); } - childrens.add(ElevatedButton( - child: Text('Save'), - style: Theme.of(context).colorScheme.primaryActionButtonStyle, - onPressed: () async { + childrens.add(GradientButton( + child: Text( + 'Save', + style: gradientButtonTextTheme(), + ), + linearGradientColors: const [ + Color(0xFF2CD267), + Color(0xFF1DB954), + ], + onTap: () async { await _shareRecoveryKey(recoveryKey); }, )); @@ -173,7 +180,6 @@ class _RecoveryKeyPageState extends State { childrens.add(SizedBox(height: 10)); childrens.add(ElevatedButton( child: Text(widget.doneText), - // style: Theme.of(context).colorScheme.primaryActionButtonStyle, onPressed: () async { await _saveKeys(); },