From ec2bf889355a818239671ed1da6e40149b7b4e4d Mon Sep 17 00:00:00 2001 From: Demir Yerli Date: Mon, 15 Jan 2024 20:28:59 +0300 Subject: [PATCH] Update import modpack and mod widgets a bit --- .../import_modpacks/import_modpacks_page.dart | 22 ++++++++++++------- lib/pages/web/mod/mod.dart | 6 ++--- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/pages/modpack_installer/import_modpacks/import_modpacks_page.dart b/lib/pages/modpack_installer/import_modpacks/import_modpacks_page.dart index 2c4ab24..bfeac3b 100644 --- a/lib/pages/modpack_installer/import_modpacks/import_modpacks_page.dart +++ b/lib/pages/modpack_installer/import_modpacks/import_modpacks_page.dart @@ -129,17 +129,23 @@ class _ShareModpacksPageState extends State { child: ListView( shrinkWrap: true, children: isLoading - ? [const LinearProgressIndicator()] + ? [const CircularProgressIndicator()] : (mods.isEmpty && otherModCount == 0) ? [ Center( child: Text(AppLocalizations.of(context)!.manualInput), ), - Center( - child: SizedBox( - width: 960, - child: TextField( - controller: modpackEntryController, + Container( + margin: const EdgeInsets.symmetric(vertical: 12), + child: Center( + child: SizedBox( + width: 960, + child: TextField( + decoration: const InputDecoration( + border: OutlineInputBorder(), + ), + controller: modpackEntryController, + ), ), ), ), @@ -151,7 +157,7 @@ class _ShareModpacksPageState extends State { children: [ Container( margin: const EdgeInsets.symmetric(horizontal: 8), - child: OutlinedButton( + child: FilledButton.tonal( child: Text( AppLocalizations.of(context)!.paste, ), @@ -167,7 +173,7 @@ class _ShareModpacksPageState extends State { ), Container( margin: const EdgeInsets.symmetric(horizontal: 8), - child: OutlinedButton( + child: FilledButton( child: Text( AppLocalizations.of(context)!.download, ), diff --git a/lib/pages/web/mod/mod.dart b/lib/pages/web/mod/mod.dart index d3d7b88..f6e2ff8 100644 --- a/lib/pages/web/mod/mod.dart +++ b/lib/pages/web/mod/mod.dart @@ -256,7 +256,7 @@ class _ModState extends State with AutomaticKeepAliveClientMixin { margin: const EdgeInsets.symmetric(vertical: 0, horizontal: 12), child: widget.downloadable - ? TextButton.icon( + ? FilledButton.icon( onPressed: () async { Uri uri = Uri.parse( 'https://api.modrinth.com/v2/tag/game_version', @@ -314,7 +314,7 @@ class _ModState extends State with AutomaticKeepAliveClientMixin { margin: widget.downloadable ? const EdgeInsets.symmetric(horizontal: 0) : const EdgeInsets.symmetric(vertical: 0), - child: TextButton.icon( + child: FilledButton.tonalIcon( onPressed: () async { final String slug = widget.slug; String rawUrl = ""; @@ -361,7 +361,7 @@ class _ModState extends State with AutomaticKeepAliveClientMixin { vertical: (showUpdateButton ? 20 : 50)), child: !isNewVersionUrl || !areButttonsActive ? showUpdateButton - ? TextButton.icon( + ? FilledButton.icon( onPressed: () async { setState(() { showUpdateButton = false;