From d5be08d0e658a2eb736f56c61ccbe8c1377916ce Mon Sep 17 00:00:00 2001 From: Davide Doronzo Date: Sun, 22 Oct 2023 06:18:04 +0100 Subject: [PATCH] Update version info positioning --- VERSION | 2 +- integration_test/navigation.test.dart | 4 ++-- lib/widgets/secondary_page.dart | 12 ++++++++++-- web/download-release-asset.html | 2 +- web/index.html | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index 7b0231f..70b02ff 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.9.3 \ No newline at end of file +1.9.4 \ No newline at end of file diff --git a/integration_test/navigation.test.dart b/integration_test/navigation.test.dart index 4a598e6..d70e55d 100644 --- a/integration_test/navigation.test.dart +++ b/integration_test/navigation.test.dart @@ -61,7 +61,7 @@ void main() { await tester.scrollUntilVisible( find.byType(BackToHomePageTextButton), 50); (find - .widgetWithText(TextButton, '< ${locale.backToHome}') + .widgetWithText(TextButton, ' ${locale.backToHome}') .evaluate() .first .widget as TextButton) @@ -142,7 +142,7 @@ void main() { await tester.scrollUntilVisible( find.byType(BackToHomePageTextButton), 50); (find - .widgetWithText(TextButton, '< ${locale.backToHome}') + .widgetWithText(TextButton, ' ${locale.backToHome}') .evaluate() .first .widget as TextButton) diff --git a/lib/widgets/secondary_page.dart b/lib/widgets/secondary_page.dart index 77d72e2..5941679 100644 --- a/lib/widgets/secondary_page.dart +++ b/lib/widgets/secondary_page.dart @@ -12,6 +12,8 @@ class SecondaryPage extends StatelessWidget { final AppBar appBar; final List listViewChildren; + final int maxHeightFixedVersionInfo = 600; + @override Widget build(BuildContext context) { final CenteredContainer versionInfoContainer = @@ -36,10 +38,16 @@ class SecondaryPage extends StatelessWidget { BackToHomePageTextButton() ]) ])), - if (style.isMobileScreenWidth(context)) versionInfoContainer + if (style.isMobileScreenWidth(context) || + MediaQuery.of(context).size.height <= + maxHeightFixedVersionInfo) + versionInfoContainer ], )), - if (!style.isMobileScreenWidth(context)) versionInfoContainer + if (!style.isMobileScreenWidth(context) && + MediaQuery.of(context).size.height > + maxHeightFixedVersionInfo) + versionInfoContainer ])); } } diff --git a/web/download-release-asset.html b/web/download-release-asset.html index 145e41d..1d44bb1 100644 --- a/web/download-release-asset.html +++ b/web/download-release-asset.html @@ -3,7 +3,7 @@ Download Sourdoc release asset diff --git a/web/index.html b/web/index.html index 03dd9cb..ffe7451 100644 --- a/web/index.html +++ b/web/index.html @@ -27,7 +27,7 @@