diff --git a/assets/fonts/Roboto-Bold.ttf b/assets/fonts/Roboto-Bold.ttf new file mode 100644 index 00000000..37424579 Binary files /dev/null and b/assets/fonts/Roboto-Bold.ttf differ diff --git a/lib/app/message.dart b/lib/app/message.dart index 2b2f2b41..df7a7fd5 100755 --- a/lib/app/message.dart +++ b/lib/app/message.dart @@ -32,7 +32,7 @@ Future showBlurDialog({ required BuildContext context, required Widget Function(BuildContext) builder, RouteSettings? routeSettings, - Color barrierColor = const Color(0x80000000), + Color barrierColor = const Color(0x00cccccc), }) async => await showGeneralDialog( context: context, diff --git a/lib/app/views/app_failure_page.dart b/lib/app/views/app_failure_page.dart index 0e8b46bb..063baa95 100755 --- a/lib/app/views/app_failure_page.dart +++ b/lib/app/views/app_failure_page.dart @@ -63,7 +63,7 @@ class AppFailurePage extends ConsumerWidget { header = null; message = l10n.p_webauthn_elevated_permissions_required; actions = [ - ElevatedButton.icon( + FilledButton.icon( label: Text(l10n.s_unlock), icon: const Icon(Icons.lock_open), onPressed: () async { diff --git a/lib/app/views/device_error_screen.dart b/lib/app/views/device_error_screen.dart index ebd76a4a..3d55be3f 100755 --- a/lib/app/views/device_error_screen.dart +++ b/lib/app/views/device_error_screen.dart @@ -46,7 +46,7 @@ class DeviceErrorScreen extends ConsumerWidget { ), message: l10n.p_elevated_permissions_required, actions: [ - ElevatedButton.icon( + FilledButton.icon( label: Text(l10n.s_unlock), icon: const Icon(Icons.lock_open), onPressed: () async { @@ -96,7 +96,7 @@ class DeviceErrorScreen extends ConsumerWidget { scale: 2, color: Theme.of(context).colorScheme.primary, ), - message: l10n.l_place_on_nfc_reader, + header: l10n.l_place_on_nfc_reader, ), }, ); diff --git a/lib/app/views/message_page.dart b/lib/app/views/message_page.dart index 6e30fe10..b388bc11 100755 --- a/lib/app/views/message_page.dart +++ b/lib/app/views/message_page.dart @@ -61,19 +61,30 @@ class MessagePage extends StatelessWidget { delayedContent: delayedContent, builder: (context, _) => Padding( padding: const EdgeInsets.only( - left: 8.0, top: 0.0, right: 8.0, bottom: 96.0), - child: Column( - children: [ - if (graphic != null) ...[graphic!, const SizedBox(height: 16.0)], - if (header != null) - Text(header!, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.titleLarge), - if (message != null) ...[ - const SizedBox(height: 12.0), - Text(message!, textAlign: TextAlign.center), + left: 32.0, top: 0.0, right: 32.0, bottom: 96.0), + child: SizedBox( + width: 350, + child: Column( + children: [ + if (graphic != null) ...[ + graphic!, + const SizedBox(height: 16.0) + ], + if (header != null) + Text(header!, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.titleLarge), + if (message != null) ...[ + const SizedBox(height: 12.0), + Text(message!, + textAlign: TextAlign.center, + style: Theme.of(context) + .textTheme + .titleSmall + ?.apply(color: Colors.grey)), + ], ], - ], + ), ), ), ); diff --git a/lib/fido/views/locked_page.dart b/lib/fido/views/locked_page.dart index 45cbfa32..feeafb41 100755 --- a/lib/fido/views/locked_page.dart +++ b/lib/fido/views/locked_page.dart @@ -207,7 +207,7 @@ class _PinEntryFormState extends ConsumerState<_PinEntryForm> { dense: true, contentPadding: const EdgeInsets.symmetric(horizontal: 0), minLeadingWidth: 0, - trailing: ElevatedButton.icon( + trailing: FilledButton.icon( icon: const Icon(Icons.lock_open), label: Text(l10n.s_unlock), onPressed: diff --git a/lib/fido/views/reset_dialog.dart b/lib/fido/views/reset_dialog.dart index c108dfed..704487ff 100755 --- a/lib/fido/views/reset_dialog.dart +++ b/lib/fido/views/reset_dialog.dart @@ -128,7 +128,10 @@ class _ResetDialogState extends ConsumerState { children: [ Text( l10n.p_warning_deletes_accounts, - style: const TextStyle(fontWeight: FontWeight.bold), + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith(fontWeight: FontWeight.w700), ), Text( l10n.p_warning_disable_accounts, diff --git a/lib/oath/views/account_helper.dart b/lib/oath/views/account_helper.dart index 5b3ce96c..dd8a907c 100755 --- a/lib/oath/views/account_helper.dart +++ b/lib/oath/views/account_helper.dart @@ -171,7 +171,6 @@ class _CodeLabel extends StatelessWidget { _formatCode(code), style: const TextStyle( fontFeatures: [FontFeature.tabularFigures()], - //fontWeight: FontWeight.w400, ), textHeightBehavior: TextHeightBehavior( // This helps with vertical centering on desktop diff --git a/lib/oath/views/account_view.dart b/lib/oath/views/account_view.dart index 1cd7fbad..3ebdbb5d 100755 --- a/lib/oath/views/account_view.dart +++ b/lib/oath/views/account_view.dart @@ -92,6 +92,8 @@ class _AccountViewState extends ConsumerState { ); final openIntent = OpenIntent(widget.credential); + final buttonStyle = FilledButton.styleFrom( + backgroundColor: Theme.of(context).hoverColor, elevation: 0); return AppListItem( credential, selected: widget.selected, @@ -107,9 +109,11 @@ class _AccountViewState extends ConsumerState { ? FilledButton.tonalIcon( icon: helper.buildCodeIcon(), label: helper.buildCodeLabel(), + style: buttonStyle, onPressed: Actions.handler(context, openIntent), ) : FilledButton.tonal( + style: buttonStyle, onPressed: Actions.handler(context, openIntent), child: helper.buildCodeIcon()), tapIntent: isDesktop && !widget.expanded ? null : openIntent, diff --git a/lib/oath/views/add_multi_account_page.dart b/lib/oath/views/add_multi_account_page.dart index 8b961bc6..abed1031 100644 --- a/lib/oath/views/add_multi_account_page.dart +++ b/lib/oath/views/add_multi_account_page.dart @@ -187,7 +187,7 @@ class _OathAddMultiAccountPageState ) ] .map((e) => Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0), + padding: const EdgeInsets.symmetric(vertical: 4.0), child: e, )) .toList(), diff --git a/lib/oath/views/reset_dialog.dart b/lib/oath/views/reset_dialog.dart index dfe6fab1..54e18fc9 100755 --- a/lib/oath/views/reset_dialog.dart +++ b/lib/oath/views/reset_dialog.dart @@ -48,10 +48,11 @@ class ResetDialog extends ConsumerWidget { padding: const EdgeInsets.symmetric(horizontal: 18.0), child: Column( children: [ - Text( - l10n.p_warning_factory_reset, - style: const TextStyle(fontWeight: FontWeight.bold), - ), + Text(l10n.p_warning_factory_reset, + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith(fontWeight: FontWeight.w700)), Text(l10n.p_warning_disable_credentials), ] .map((e) => Padding( diff --git a/lib/oath/views/unlock_form.dart b/lib/oath/views/unlock_form.dart index b1671f32..3eed83e7 100755 --- a/lib/oath/views/unlock_form.dart +++ b/lib/oath/views/unlock_form.dart @@ -133,7 +133,7 @@ class _UnlockFormState extends ConsumerState { }); }, ), - ElevatedButton.icon( + FilledButton.icon( key: keys.unlockButton, label: Text(l10n.s_unlock), icon: const Icon(Icons.lock_open), diff --git a/lib/piv/views/reset_dialog.dart b/lib/piv/views/reset_dialog.dart index dcd4ef38..ab8dcfc5 100644 --- a/lib/piv/views/reset_dialog.dart +++ b/lib/piv/views/reset_dialog.dart @@ -51,10 +51,11 @@ class ResetDialog extends ConsumerWidget { padding: const EdgeInsets.symmetric(horizontal: 18.0), child: Column( children: [ - Text( - l10n.p_warning_piv_reset, - style: const TextStyle(fontWeight: FontWeight.bold), - ), + Text(l10n.p_warning_piv_reset, + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith(fontWeight: FontWeight.w700)), Text(l10n.p_warning_piv_reset_desc), ] .map((e) => Padding( diff --git a/lib/theme.dart b/lib/theme.dart index d9c864c1..f2420def 100755 --- a/lib/theme.dart +++ b/lib/theme.dart @@ -34,25 +34,33 @@ const themeGreen = Color(0xFF78B850); const themeGrey = Color(0xFF8C8B8C); */ -//const primaryColor = Colors.blueAccent; +const primaryColor = Colors.blueAccent; //const primaryColor = Colors.green; -const primaryColor = Colors.deepPurple; +//const primaryColor = Colors.deepPurple; + +const defaultTextTheme = Typography.englishLike2021; class AppTheme { static ThemeData get lightTheme => ThemeData( useMaterial3: true, colorScheme: ColorScheme.fromSeed( - seedColor: primaryColor, brightness: Brightness.light, + seedColor: primaryColor, background: const Color(0xfffefdf4), - surface: const Color(0xfffefdf4), - ), - listTileTheme: const ListTileThemeData( - // For alignment under menu button - contentPadding: EdgeInsets.symmetric(horizontal: 18.0), - visualDensity: VisualDensity.compact, ), fontFamily: 'Roboto', + appBarTheme: const AppBarTheme( + color: Colors.transparent, + ), + listTileTheme: ListTileThemeData( + // For alignment under menu button + contentPadding: const EdgeInsets.symmetric(horizontal: 18.0), + visualDensity: VisualDensity.compact, + titleTextStyle: defaultTextTheme.bodyLarge! + .copyWith(color: Colors.black87, fontFamily: 'Roboto'), + subtitleTextStyle: defaultTextTheme.bodyMedium! + .copyWith(color: Colors.black54, fontFamily: 'Roboto'), + ), tooltipTheme: const TooltipThemeData( waitDuration: Duration(milliseconds: 500), textStyle: TextStyle(color: Color(0xff3c3c3c)), @@ -66,17 +74,23 @@ class AppTheme { static ThemeData get darkTheme => ThemeData( useMaterial3: true, colorScheme: ColorScheme.fromSeed( - seedColor: primaryColor, brightness: Brightness.dark, + seedColor: primaryColor, background: const Color(0xff282828), - surface: const Color(0xff282828), - ), - listTileTheme: const ListTileThemeData( - // For alignment under menu button - contentPadding: EdgeInsets.symmetric(horizontal: 18.0), - visualDensity: VisualDensity.compact, ), fontFamily: 'Roboto', + appBarTheme: const AppBarTheme( + color: Colors.transparent, + ), + listTileTheme: ListTileThemeData( + // For alignment under menu button + contentPadding: const EdgeInsets.symmetric(horizontal: 18.0), + visualDensity: VisualDensity.compact, + titleTextStyle: defaultTextTheme.bodyLarge! + .copyWith(color: Colors.white, fontFamily: 'Roboto'), + subtitleTextStyle: defaultTextTheme.bodyMedium! + .copyWith(color: Colors.white54, fontFamily: 'Roboto'), + ), tooltipTheme: const TooltipThemeData( waitDuration: Duration(milliseconds: 500), textStyle: TextStyle(color: Color(0xffE2E2E6)), diff --git a/lib/widgets/responsive_dialog.dart b/lib/widgets/responsive_dialog.dart index 4005e2bb..a6ea00f0 100755 --- a/lib/widgets/responsive_dialog.dart +++ b/lib/widgets/responsive_dialog.dart @@ -80,7 +80,6 @@ class _ResponsiveDialogState extends State { title: widget.title, titlePadding: const EdgeInsets.only(top: 24, left: 18, right: 18), scrollable: true, - backgroundColor: Theme.of(context).colorScheme.surface.withOpacity(0.9), contentPadding: const EdgeInsets.symmetric(vertical: 8), content: SizedBox( width: 600, diff --git a/pubspec.yaml b/pubspec.yaml index 79aec45f..b5752b20 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -151,3 +151,5 @@ flutter: weight: 300 - asset: assets/fonts/Roboto-Thin.ttf weight: 100 + - asset: assets/fonts/Roboto-Bold.ttf + weight: 700