From 0db2c88f83332fbfa6906a4f3a0a860765a5b916 Mon Sep 17 00:00:00 2001 From: My1 <6696524+My1@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:47:35 +0100 Subject: [PATCH 1/2] Update game_steps_widget.dart Fix data Unit, simplify GiB calculation. --- .../lib/widgets/steps/game_steps_widget.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/babylonia_terminal_launcher/lib/widgets/steps/game_steps_widget.dart b/babylonia_terminal_launcher/lib/widgets/steps/game_steps_widget.dart index c4cb54e..34f5d4b 100644 --- a/babylonia_terminal_launcher/lib/widgets/steps/game_steps_widget.dart +++ b/babylonia_terminal_launcher/lib/widgets/steps/game_steps_widget.dart @@ -107,8 +107,9 @@ class _DownloadingGame extends StatelessWidget { final provider = Provider.of(context); final pourcent = (provider.currentProgress.toInt() / provider.maxProgress.toInt()) * 100; - final currentGb = provider.currentProgress.toInt() / 1024 / 1024 / 1024; - final maxGb = provider.maxProgress.toInt() / 1024 / 1024 / 1024; + //1024^3 = 1073741824 + final currentGb = provider.currentProgress.toInt() / 1073741824; + final maxGb = provider.maxProgress.toInt() / 1073741824; return Padding( padding: const EdgeInsets.only(bottom: 40.0), @@ -118,7 +119,7 @@ class _DownloadingGame extends StatelessWidget { Padding( padding: const EdgeInsets.only(bottom: 8.0), child: Text( - "${currentGb.toStringAsFixed(2)} / ${maxGb.toStringAsFixed(2)} Gb (${pourcent.toStringAsFixed(2)}%)", + "${currentGb.toStringAsFixed(2)} / ${maxGb.toStringAsFixed(2)} GiB (${pourcent.toStringAsFixed(2)}%)", ), ), YaruLinearProgressIndicator( From 617b21f3abd3aeed641dac76af3e6a5f06a43caf Mon Sep 17 00:00:00 2001 From: My1 <6696524+My1@users.noreply.github.com> Date: Thu, 31 Oct 2024 21:04:51 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- babylonia_terminal_launcher/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/babylonia_terminal_launcher/CHANGELOG.md b/babylonia_terminal_launcher/CHANGELOG.md index a71570c..c1c7cd6 100644 --- a/babylonia_terminal_launcher/CHANGELOG.md +++ b/babylonia_terminal_launcher/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Changed "Gb" (which ordinarily would be Gigabits) to "GiB" in the download progress + ## [0.1.2] - 2024-10-28 ### Changed