diff --git a/fastlane/metadata/android/en-US/changelogs/2.txt b/fastlane/metadata/android/en-US/changelogs/2.txt new file mode 100644 index 0000000000000000000000000000000000000000..d0b6b8e4230626dd30a735b8c908c8495ecfd7cc --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/2.txt @@ -0,0 +1 @@ +Fix display big vertical grids. diff --git a/fastlane/metadata/android/fr-FR/changelogs/2.txt b/fastlane/metadata/android/fr-FR/changelogs/2.txt new file mode 100644 index 0000000000000000000000000000000000000000..14a59d12991e4af04fd9da3f3440e48c55f61ae6 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/2.txt @@ -0,0 +1 @@ +Correction sur l'affichage des grandes grilles verticales. diff --git a/lib/ui/widgets/game/cell.dart b/lib/ui/widgets/game/cell.dart index 13d0d857762be00606a2e0a357db47a19708ff06..c2b8c7a124a7f73bd2ea249ffa78a25975cd923b 100644 --- a/lib/ui/widgets/game/cell.dart +++ b/lib/ui/widgets/game/cell.dart @@ -1,4 +1,3 @@ -import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; @@ -124,18 +123,7 @@ class CellWidget extends StatelessWidget { const Color cellBorderSelectedColor = Colors.red; Color cellBorderColor = cellBorderSelectedColor; - double cellBorderWidth = 4; - - final int boardSizeReference = - max(activity.boardSizeHorizontal, activity.boardSizeVertical); - - // Reduce cell border width on big boards - if (boardSizeReference > 8) { - cellBorderWidth = 2; - if (boardSizeReference > 10) { - cellBorderWidth = 1; - } - } + final double cellBorderWidth = 4; if (!activity.isRunning) { cellBorderColor = Colors.green.shade700; diff --git a/lib/ui/widgets/game/game_board.dart b/lib/ui/widgets/game/game_board.dart index 7b2ef3384db3c74d846b8e6486746738d924d8ba..1ec0775d7a783fe3d408626b0c8e51c6dbfc5ccc 100644 --- a/lib/ui/widgets/game/game_board.dart +++ b/lib/ui/widgets/game/game_board.dart @@ -1,3 +1,4 @@ + import 'package:flutter/material.dart'; import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; @@ -17,7 +18,11 @@ class GameBoardWidget extends StatelessWidget { final Color borderColor = Theme.of(context).colorScheme.onSurface; - return Container( + final Size size = MediaQuery.of(context).size; + final double width = size.width; + final double height = size.height; + + final Container board = Container( margin: const EdgeInsets.all(2), padding: const EdgeInsets.all(2), decoration: BoxDecoration( @@ -81,6 +86,16 @@ class GameBoardWidget extends StatelessWidget { ], ), ); + + return ConstrainedBox( + constraints: BoxConstraints.tightFor( + width: width, + height: height * .6, + ), + child: FittedBox( + child: board, + ), //Text + ); }, ); } diff --git a/pubspec.yaml b/pubspec.yaml index a0962c09c9725a46e71d3853d0deb9b74b988b20..f03814e44b4a200f7ef46a4f59884f8ef0a72d4e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A suguru game application. publish_to: "none" -version: 0.0.1+1 +version: 0.0.2+2 environment: sdk: "^3.0.0"