Skip to content
Snippets Groups Projects
Commit ff4fb3c6 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Fix/improve diplay

parent e78f4fbc
No related branches found
No related tags found
1 merge request!45Resolve "Fix / update layout"
Pipeline #3027 passed
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=0.0.43 app.versionName=0.0.44
app.versionCode=43 app.versionCode=44
assets/icons/button_shuffle.png

3.23 KiB | W: | H:

assets/icons/button_shuffle.png

6.1 KiB | W: | H:

assets/icons/button_shuffle.png
assets/icons/button_shuffle.png
assets/icons/button_shuffle.png
assets/icons/button_shuffle.png
  • 2-up
  • Swipe
  • Onion skin
assets/icons/placeholder.png

170 B

assets/icons/tip_hidden.png

3.91 KiB

assets/images/placeholder.png

1.34 KiB

assets/ui/tip-hidden.png

9.9 KiB

Fix/improve display
Corrections/améliorations d'affichage
...@@ -19,6 +19,8 @@ AVAILABLE_GAME_IMAGES=" ...@@ -19,6 +19,8 @@ AVAILABLE_GAME_IMAGES="
button_back button_back
button_shuffle button_shuffle
game_win game_win
placeholder
tip_hidden
" "
# Settings images # Settings images
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m83.437 0.38264h-73.092c-5.6481 0-9.9672 4.3191-9.9672 9.9672v73.092c0 5.6481 4.3191 9.9672 9.9672 9.9672h73.092c5.6481 0 9.9672-4.3191 9.9672-9.9672v-73.092c0-5.6481-4.3191-9.9672-9.9672-9.9672zm-19.602 31.23-12.625 15.283 12.957 15.283c0.66448 0.66448 1.6612 1.329 2.6579 1.329v-3.3224c0-1.9934 1.329-3.3224 3.3224-3.3224 0.99672 0 1.6612 0.33224 2.3257 0.99672l6.977 6.3125c1.6612 1.6612 1.6612 2.3257 0 4.3191l-7.3092 7.3092c-1.329 1.329-3.3224 0.99672-4.6513-0.33224-0.33224-0.66448-0.66448-1.329-0.66448-1.9934v-3.3224h-0.33224c-2.9901 0-5.6481-1.329-7.6415-3.6546l-11.961-14.286-11.961 14.618c-1.9934 1.9934-4.6513 3.3224-7.6415 3.3224h-10.299c-1.9934 0-3.3224-1.329-3.3224-3.3224s1.329-3.3224 3.3224-3.3224h10.299c0.99672 0 1.9934-0.33224 2.6579-1.329l12.957-15.283-12.957-15.283c-0.66448-0.66448-1.6612-1.329-2.6579-1.329h-10.299c-1.9934 0-3.3224-1.329-3.3224-3.3224s1.329-3.3224 3.3224-3.3224h10.299c2.9901 0 5.6481 1.329 7.6415 3.6546l11.961 14.618 11.961-14.618c1.9934-2.3257 4.6513-3.6546 7.6415-3.6546h0.33224v-3.3224c0-1.9934 1.329-3.3224 3.3224-3.3224 0.99672 0 1.6612 0.33224 2.3257 0.99672l6.6448 6.6448c1.6612 1.6612 1.9934 2.9901 0.33224 4.9836l-6.6448 6.6448c-1.329 1.329-2.9901 1.9934-4.6513 0.66448-0.99672-0.66448-1.329-1.6612-1.329-3.6546v-2.9901s-1.9934 0-2.9901 1.329z" fill="#7a0d86" stroke-width="3.3224"/></svg> <svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m83.437 0.38264h-73.092c-5.6481 0-9.9672 4.3191-9.9672 9.9672v73.092c0 5.6481 4.3191 9.9672 9.9672 9.9672h73.092c5.6481 0 9.9672-4.3191 9.9672-9.9672v-73.092c0-5.6481-4.3191-9.9672-9.9672-9.9672z" fill="#7a0d86" stroke-width="3.3224"/><path d="m63.486 31.631-12.625 15.283 12.957 15.283c0.66448 0.66448 1.6612 1.329 2.6579 1.329v-3.3224c0-1.9934 1.329-3.3224 3.3224-3.3224 0.99672 0 1.6612 0.33224 2.3257 0.99672l6.977 6.3125c1.6612 1.6612 1.6612 2.3257 0 4.3191l-7.3092 7.3092c-1.329 1.329-3.3224 0.99672-4.6513-0.33224-0.33224-0.66448-0.66448-1.329-0.66448-1.9934v-3.3224h-0.33224c-2.9901 0-5.6481-1.329-7.6415-3.6546l-11.961-14.286-11.961 14.618c-1.9934 1.9934-4.6513 3.3224-7.6415 3.3224h-10.299c-1.9934 0-3.3224-1.329-3.3224-3.3224s1.329-3.3224 3.3224-3.3224h10.299c0.99672 0 1.9934-0.33224 2.6579-1.329l12.957-15.283-12.957-15.283c-0.66448-0.66448-1.6612-1.329-2.6579-1.329h-10.299c-1.9934 0-3.3224-1.329-3.3224-3.3224s1.329-3.3224 3.3224-3.3224h10.299c2.9901 0 5.6481 1.329 7.6415 3.6546l11.961 14.618 11.961-14.618c1.9934-2.3257 4.6513-3.6546 7.6415-3.6546h0.33224v-3.3224c0-1.9934 1.329-3.3224 3.3224-3.3224 0.99672 0 1.6612 0.33224 2.3257 0.99672l6.6448 6.6448c1.6612 1.6612 1.9934 2.9901 0.33224 4.9836l-6.6448 6.6448c-1.329 1.329-2.9901 1.9934-4.6513 0.66448-0.99672-0.66448-1.329-1.6612-1.329-3.6546v-2.9901s-1.9934 0-2.9901 1.329z" fill="#fff" stroke="#51095a" stroke-width="2.522"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"/>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m47.419 91.533c-14.483-1.4711-26.538-9.7295-32.927-22.557-2.0566-4.1291-3.4273-8.7761-3.9654-13.444-0.30815-2.673-0.23214-7.9911 0.15061-10.539 0.84044-5.5936 3.1364-11.607 6.2231-16.298 6.4532-9.8085 16.68-16.327 28.323-18.054 2.1955-0.32552 8.921-0.37113 10.978-0.07446 5.469 0.78889 10.751 2.6011 15.245 5.2303 10.453 6.1155 17.606 16.476 19.651 28.464 1.9271 11.294-1.1132 23.026-8.3069 32.055-6.4701 8.1207-15.634 13.37-26.077 14.937-2.2803 0.34222-7.2175 0.49085-9.295 0.27983zm8.8873-9.3466c6.673-1.2151 12.295-4.1439 17.024-8.8683 7.7875-7.7803 10.979-18.933 8.4607-29.569-2.4259-10.248-9.6026-18.508-19.398-22.325-3.7629-1.4665-7.1739-2.0891-11.462-2.0921-8.3878-0.00589-15.964 3.0661-22.046 8.9393-5.008 4.8361-8.2737 11.26-9.2966 18.286-0.34281 2.3547-0.33794 6.545 0.01035 8.9018 1.9499 13.195 11.796 23.707 24.819 26.497 2.4493 0.52489 3.8357 0.64169 7.0257 0.59188 2.4108-0.03764 3.5482-0.1222 4.8622-0.36146zm-6.9845-4.3092c-2.0306-0.67468-3.3769-1.9825-4.0304-3.9151-0.6471-1.9136-0.16149-4.3699 1.162-5.8772 2.2539-2.567 6.4473-2.6551 8.7838-0.18461 2.8638 3.0281 2.0255 7.7563-1.7003 9.5905-0.83881 0.41295-1.1556 0.4859-2.3011 0.52991-0.84613 0.03252-1.541-0.01957-1.9139-0.1435zm0.43911-16.54c-1.3203-0.43821-2.2331-1.2126-2.8753-2.4391-0.32701-0.62458-0.34485-0.80253-0.34485-3.4397v-2.781l0.43126-0.77852c0.86656-1.5643 1.9406-2.1818 4.2654-2.4522 2.359-0.27437 3.8916-0.96793 5.2028-2.3544 1.7046-1.8026 2.4475-4.6877 1.817-7.0566-0.78683-2.9562-3.274-5.1673-6.3047-5.6048-1.4545-0.20999-3.0255 0.06809-4.46 0.78946-1.7187 0.8643-3.3195 2.8187-3.8086 4.6498-0.09676 0.36226-0.22738 1.256-0.29026 1.9861-0.08293 0.96278-0.2161 1.5282-0.48478 2.0585-1.3079 2.581-4.5521 3.2501-6.9374 1.4307-0.62185-0.47431-1.3098-1.6777-1.5102-2.6417-0.19181-0.92288 0.01461-3.2041 0.44105-4.8743 1.59-6.2276 6.7059-11.011 13.081-12.231 1.4899-0.28506 4.419-0.28119 5.9427 0.0079 1.3862 0.26295 3.3582 0.93186 4.6175 1.5662 3.1519 1.5878 6.2485 4.8956 7.5989 8.117 0.58121 1.3865 1.0419 3.0941 1.2486 4.6275 0.51389 3.8137-0.52328 8.0566-2.7827 11.384-0.94468 1.3911-2.7899 3.233-4.2125 4.205-1.5139 1.0343-2.3474 1.466-3.8785 2.0084-0.65376 0.23162-1.179 0.50678-1.22 0.63906-0.60139 1.9444-2.0991 3.1698-4.0482 3.3121-0.5377 0.03925-1.1387-0.01262-1.4877-0.12845z" stroke-width=".14637"/></svg>
...@@ -16,7 +16,6 @@ class Home extends StatelessWidget { ...@@ -16,7 +16,6 @@ class Home extends StatelessWidget {
static const String id = 'home'; static const String id = 'home';
final Color themePrimaryColor = Colors.blue; final Color themePrimaryColor = Colors.blue;
final double _tipImageSize = 100;
final int _selectImageColumnsCount = 3; final int _selectImageColumnsCount = 3;
Future<void> resetGame(Data myProvider) async { Future<void> resetGame(Data myProvider) async {
...@@ -136,7 +135,6 @@ class Home extends StatelessWidget { ...@@ -136,7 +135,6 @@ class Home extends StatelessWidget {
width: 4, width: 4,
), ),
), ),
margin: EdgeInsets.all(8),
child: Image( child: Image(
image: AssetImage(assetName), image: AssetImage(assetName),
fit: BoxFit.fill, fit: BoxFit.fill,
...@@ -262,30 +260,59 @@ class Home extends StatelessWidget { ...@@ -262,30 +260,59 @@ class Home extends StatelessWidget {
Container _buildTipWidget(Data myProvider) { Container _buildTipWidget(Data myProvider) {
return Container( return Container(
child: TextButton( margin: EdgeInsets.all(2),
child: Container( padding: EdgeInsets.all(2),
margin: EdgeInsets.all(4), child: Table(
padding: EdgeInsets.all(4), defaultColumnWidth: IntrinsicColumnWidth(),
decoration: BoxDecoration( children: [
color: Colors.blue, TableRow(
borderRadius: BorderRadius.circular(4), children: [
border: Border.all( Column(
color: Colors.blue, children: [
width: 4, Image(
), image: AssetImage('assets/images/placeholder.png'),
), fit: BoxFit.fill,
child: Image( ),
image: AssetImage( ],
myProvider.displayTipImage ),
? getImageAssetName(myProvider.image) Column(
: 'assets/ui/tip-hidden.png', children: [
), TextButton(
width: _tipImageSize, child: Container(
height: _tipImageSize, // margin: EdgeInsets.all(4),
fit: BoxFit.fill, // padding: EdgeInsets.all(4),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(4),
border: Border.all(
color: Colors.blue,
width: 4,
),
),
child: Image(
image: AssetImage(
myProvider.displayTipImage
? getImageAssetName(myProvider.image)
: 'assets/icons/tip_hidden.png',
),
fit: BoxFit.contain,
),
),
onPressed: () => toggleDisplayTipImage(myProvider),
),
],
),
Column(
children: [
Image(
image: AssetImage('assets/images/placeholder.png'),
fit: BoxFit.fill,
),
],
),
],
), ),
), ],
onPressed: () => toggleDisplayTipImage(myProvider),
), ),
); );
} }
...@@ -293,8 +320,6 @@ class Home extends StatelessWidget { ...@@ -293,8 +320,6 @@ class Home extends StatelessWidget {
Container _buildGameWidget(Data myProvider) { Container _buildGameWidget(Data myProvider) {
return Container( return Container(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
_buildTilesetWidget(myProvider), _buildTilesetWidget(myProvider),
SizedBox(height: 20), SizedBox(height: 20),
...@@ -404,7 +429,6 @@ class Home extends StatelessWidget { ...@@ -404,7 +429,6 @@ class Home extends StatelessWidget {
width: 4, width: 4,
), ),
), ),
margin: EdgeInsets.all(8),
child: Image( child: Image(
image: AssetImage('assets/icons/button_shuffle.png'), image: AssetImage('assets/icons/button_shuffle.png'),
fit: BoxFit.fill, fit: BoxFit.fill,
...@@ -424,7 +448,6 @@ class Home extends StatelessWidget { ...@@ -424,7 +448,6 @@ class Home extends StatelessWidget {
width: 4, width: 4,
), ),
), ),
margin: EdgeInsets.all(8),
child: Image( child: Image(
image: AssetImage('assets/icons/button_back.png'), image: AssetImage('assets/icons/button_back.png'),
fit: BoxFit.fill, fit: BoxFit.fill,
......
...@@ -22,4 +22,3 @@ flutter: ...@@ -22,4 +22,3 @@ flutter:
- assets/files/ - assets/files/
- assets/icons/ - assets/icons/
- assets/images/ - assets/images/
- assets/ui/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment