From 34365239c197eee4fd7f1705e51750ce6f0950b1 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 12 Feb 2024 20:46:58 +0100 Subject: [PATCH] fix: Use correct title size for bottom sheet (#1687) Co-authored-by: aAbed --- assets/i18n/en_US.json | 0 assets/i18n/strings.i18n.json | 10 +- .../homeView/update_confirmation_sheet.dart | 112 ++++++++++-------- 3 files changed, 68 insertions(+), 54 deletions(-) create mode 100644 assets/i18n/en_US.json diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/assets/i18n/strings.i18n.json b/assets/i18n/strings.i18n.json index 0167e1ca74..667a8bf78d 100755 --- a/assets/i18n/strings.i18n.json +++ b/assets/i18n/strings.i18n.json @@ -270,11 +270,11 @@ }, "contributorsView": { "widgetTitle": "Contributors", - "patcherContributors": "Patcher contributors", - "patchesContributors": "Patches contributors", - "integrationsContributors": "Integrations contributors", - "cliContributors": "CLI contributors", - "managerContributors": "Manager contributors" + "patcherContributors": "ReVanced Patcher", + "patchesContributors": "ReVanced Patches", + "integrationsContributors": "ReVanced Integrations", + "cliContributors": "ReVanced CLI", + "managerContributors": "ReVanced Manager" }, "installErrorDialog": { "mount_version_mismatch": "Version mismatch", diff --git a/lib/ui/widgets/homeView/update_confirmation_sheet.dart b/lib/ui/widgets/homeView/update_confirmation_sheet.dart index 9f5a5b5646..87b552abfb 100644 --- a/lib/ui/widgets/homeView/update_confirmation_sheet.dart +++ b/lib/ui/widgets/homeView/update_confirmation_sheet.dart @@ -5,7 +5,11 @@ import 'package:revanced_manager/gen/strings.g.dart'; import 'package:revanced_manager/ui/views/home/home_viewmodel.dart'; class UpdateConfirmationSheet extends StatelessWidget { - const UpdateConfirmationSheet({super.key, required this.isPatches, this.changelog = false}); + const UpdateConfirmationSheet({ + super.key, + required this.isPatches, + this.changelog = false, + }); final bool isPatches; final bool changelog; @@ -38,70 +42,75 @@ class UpdateConfirmationSheet extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ if (!changelog) - Padding( - padding: const EdgeInsets.only( - top: 40.0, - left: 24.0, - right: 24.0, - bottom: 20.0, - ), - child: Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ + Padding( + padding: const EdgeInsets.only( + top: 40.0, + left: 24.0, + right: 24.0, + bottom: 20.0, + ), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Text( - isPatches + isPatches ? t.homeView.updatePatchesSheetTitle : t.homeView.updateSheetTitle, style: const TextStyle( - fontSize: 24, - fontWeight: FontWeight.bold, - ), - ), - const SizedBox(height: 4.0), - Row( - children: [ - Icon( - Icons.new_releases_outlined, - color: - Theme.of(context).colorScheme.secondary, + fontSize: 24, + fontWeight: FontWeight.bold, + ), ), - const SizedBox(width: 8.0), - Text( - snapshot.data!['tag_name'] ?? 'Unknown', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w500, + const SizedBox(height: 4.0), + Row( + children: [ + Icon( + Icons.new_releases_outlined, color: Theme.of(context) .colorScheme .secondary, ), - ), - ], - ), - ], + const SizedBox(width: 8.0), + Text( + snapshot.data!['tag_name'] ?? 'Unknown', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w500, + color: Theme.of(context) + .colorScheme + .secondary, + ), + ), + ], + ), + ], + ), ), - ), - FilledButton( - onPressed: () { - Navigator.of(context).pop(); - isPatches - ? model.updatePatches(context) - : model.updateManager(context); - }, + FilledButton( + onPressed: () { + Navigator.of(context).pop(); + isPatches + ? model.updatePatches(context) + : model.updateManager(context); + }, child: Text(t.updateButton), - ), - ], + ), + ], + ), ), - ), Padding( - padding: const EdgeInsets.only(top: 12.0, left: 24.0, bottom: 12.0), + padding: const EdgeInsets.only( + top: 12.0, + left: 24.0, + bottom: 12.0, + ), child: Text( t.homeView.updateChangelogTitle, style: TextStyle( - fontSize: 20, + fontSize: changelog ? 24 : 20, fontWeight: FontWeight.w500, color: Theme.of(context).colorScheme.onSecondaryContainer, @@ -115,6 +124,11 @@ class UpdateConfirmationSheet extends StatelessWidget { borderRadius: BorderRadius.circular(12.0), ), child: Markdown( + styleSheet: MarkdownStyleSheet( + a: TextStyle( + color: Theme.of(context).colorScheme.primary, + ), + ), shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), padding: const EdgeInsets.all(20.0),