diff --git a/lib/ente_theme_data.dart b/lib/ente_theme_data.dart index f7c3added..a52a2e2bc 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 85d35b792..62d97a1b6 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 6f52e108f..3bbffd6d1 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 cdbcab06a..b9679131f 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 f378af89d..72f363cf9 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(); },