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

Improve some UI

parent 44266ab9
No related branches found
No related tags found
1 merge request!24Resolve "Update icons"
Pipeline #6757 passed
This commit is part of merge request !24. Comments created here will be created in the context of that merge request.
Showing
with 49 additions and 12 deletions
assets/skins/default_indicator_report_off.png

1.95 KiB | W: | H:

assets/skins/default_indicator_report_off.png

2.15 KiB | W: | H:

assets/skins/default_indicator_report_off.png
assets/skins/default_indicator_report_off.png
assets/skins/default_indicator_report_off.png
assets/skins/default_indicator_report_off.png
  • 2-up
  • Swipe
  • Onion skin
assets/skins/default_indicator_report_on.png

4.21 KiB | W: | H:

assets/skins/default_indicator_report_on.png

4.19 KiB | W: | H:

assets/skins/default_indicator_report_on.png
assets/skins/default_indicator_report_on.png
assets/skins/default_indicator_report_on.png
assets/skins/default_indicator_report_on.png
  • 2-up
  • Swipe
  • Onion skin
assets/skins/default_indicator_walk_off.png

3.33 KiB | W: | H:

assets/skins/default_indicator_walk_off.png

3.47 KiB | W: | H:

assets/skins/default_indicator_walk_off.png
assets/skins/default_indicator_walk_off.png
assets/skins/default_indicator_walk_off.png
assets/skins/default_indicator_walk_off.png
  • 2-up
  • Swipe
  • Onion skin
assets/skins/default_indicator_walk_on.png

6.11 KiB | W: | H:

assets/skins/default_indicator_walk_on.png

6.2 KiB | W: | H:

assets/skins/default_indicator_walk_on.png
assets/skins/default_indicator_walk_on.png
assets/skins/default_indicator_walk_on.png
assets/skins/default_indicator_walk_on.png
  • 2-up
  • Swipe
  • Onion skin
Improve some UI.
Améliorations visuelles.
......@@ -15,8 +15,10 @@ class GameModeIndicatorReport extends StatelessWidget {
final String skin = currentActivity.globalSettings.skin;
final String reportModeSuffix = currentActivity.reportMode ? 'on' : 'off';
final Color buttonColor = currentActivity.reportMode ? Colors.amber : Colors.grey;
return TextButton(
return StyledButton(
color: buttonColor,
child: Image(
image: AssetImage('assets/skins/${skin}_indicator_report_$reportModeSuffix.png'),
fit: BoxFit.fill,
......
......@@ -15,8 +15,10 @@ class GameModeIndicatorWalk extends StatelessWidget {
final String skin = currentActivity.globalSettings.skin;
final String reportModeSuffix = currentActivity.reportMode ? 'off' : 'on';
final Color buttonColor = currentActivity.reportMode ? Colors.grey : Colors.amber;
return TextButton(
return StyledButton(
color: buttonColor,
child: Image(
image: AssetImage('assets/skins/${skin}_indicator_walk_$reportModeSuffix.png'),
fit: BoxFit.fill,
......
......@@ -25,6 +25,7 @@ class ToggleGameMode extends StatelessWidget {
return Table(
defaultColumnWidth: const IntrinsicColumnWidth(),
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
children: [
TableRow(
children: [
......
......@@ -17,7 +17,9 @@ class TopIndicator extends StatelessWidget {
final int flaggedCellsCount = currentActivity.countFlaggedCells();
final int minesCount = currentActivity.minesCount;
const double blockSize = 40;
const double blockSize = 30;
final blockWidth = MediaQuery.of(context).size.width / 4;
final Image flagIconBlock = Image(
image: AssetImage('assets/skins/${skin}_tile_flag.png'),
......@@ -48,6 +50,36 @@ class TopIndicator extends StatelessWidget {
),
);
final Widget flagsWidget = StyledContainer(
borderWidth: 8,
child: SizedBox(
width: blockWidth,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
markedMinesCountBlock,
flagIconBlock,
],
),
),
);
final Widget minesWidget = StyledContainer(
borderWidth: 8,
child: SizedBox(
width: blockWidth,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
mineIconBlock,
placedMinesCountBlock,
],
),
),
);
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
......@@ -56,11 +88,9 @@ class TopIndicator extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
markedMinesCountBlock,
flagIconBlock,
flagsWidget,
const SizedBox(width: blockSize * 2),
mineIconBlock,
placedMinesCountBlock,
minesWidget,
],
)
],
......
......@@ -3,7 +3,7 @@ description: A minehunter game application.
publish_to: "none"
version: 0.5.0+47
version: 0.5.1+48
environment:
sdk: "^3.0.0"
......
<?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"><rect x="-.0013123" y="-.0014381" width="93.668" height="93.679" ry="0" fill="#9f9f9f" stroke="#fff" stroke-width=".24146"/><path d="m63.009 39.288c-4.4337 1.6324-7.8123 2.7951-10.784 6.4707-2.6476 3.2753-6.4707 4.4107-10.784 2.2516v11.768h-2.1568v-29.117c0-0.5961 0.48232-1.0784 1.0784-1.0784s1.0784 0.48232 1.0784 1.0784c2.3949 3.4817 6.5567 4.2526 10.784 4.3136 6.4707 0.09477 10.784 4.3136 10.784 4.3136zm-19.412 14.306v2.1948c2.5444 0.52025 4.3136 1.624 4.3136 2.911 0 1.7861-3.3806 3.2353-7.5489 3.2353s-7.5489-1.4492-7.5489-3.2353c0-1.287 1.7693-2.3907 4.3136-2.911v-2.1947c-3.9177 0.67828-6.4707 2.5781-6.4707 5.1056 0 3.1742 3.9914 5.392 9.7059 5.392s9.7059-2.2179 9.7059-5.392c0-2.5275-2.5528-4.4273-6.4707-5.1056z" fill="#af0303" stroke="#730202" stroke-linejoin="round" stroke-width=".86919"/></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="m63.009 39.288c-4.4337 1.6324-7.8123 2.7951-10.784 6.4707-2.6476 3.2753-6.4707 4.4107-10.784 2.2516v11.768h-2.1568v-29.117c0-0.5961 0.48232-1.0784 1.0784-1.0784s1.0784 0.48232 1.0784 1.0784c2.3949 3.4817 6.5567 4.2526 10.784 4.3136 6.4707 0.09477 10.784 4.3136 10.784 4.3136zm-19.412 14.306v2.1948c2.5444 0.52025 4.3136 1.624 4.3136 2.911 0 1.7861-3.3806 3.2353-7.5489 3.2353s-7.5489-1.4492-7.5489-3.2353c0-1.287 1.7693-2.3907 4.3136-2.911v-2.1947c-3.9177 0.67828-6.4707 2.5781-6.4707 5.1056 0 3.1742 3.9914 5.392 9.7059 5.392s9.7059-2.2179 9.7059-5.392c0-2.5275-2.5528-4.4273-6.4707-5.1056z" fill="#af0303" stroke="#730202" stroke-linejoin="round" stroke-width=".86919"/></svg>
<?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"><rect x="-.0013123" y="-.0014381" width="93.668" height="93.679" ry="0" fill="#ea9c1f" stroke="#fff" stroke-width=".24146"/><path d="m78.682 31.974c-8.7296 3.214-15.381 5.5032-21.232 12.74-5.2129 6.4487-12.74 8.6842-21.232 4.4332v23.169h-4.2465v-57.328c0-1.1736 0.94963-2.1232 2.1232-2.1232 1.1735 0 2.1232 0.94963 2.1232 2.1232 4.7153 6.855 12.91 8.3728 21.232 8.4931 12.74 0.18659 21.232 8.4931 21.232 8.4931zm-38.22 28.168v4.3213c5.0096 1.0243 8.4931 3.1974 8.4931 5.7314 0 3.5167-6.656 6.3699-14.863 6.3699s-14.863-2.8532-14.863-6.3699c0-2.534 3.4834-4.707 8.4931-5.7314v-4.3211c-7.7135 1.3355-12.74 5.076-12.74 10.052 0 6.2497 7.8586 10.616 19.11 10.616s19.11-4.3668 19.11-10.616c0-4.9764-5.0262-8.7168-12.74-10.052z" fill="#af0303" stroke="#730202" stroke-linejoin="round" stroke-width="1.7113"/></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="m78.682 31.974c-8.7296 3.214-15.381 5.5032-21.232 12.74-5.2129 6.4487-12.74 8.6842-21.232 4.4332v23.169h-4.2465v-57.328c0-1.1736 0.94963-2.1232 2.1232-2.1232 1.1735 0 2.1232 0.94963 2.1232 2.1232 4.7153 6.855 12.91 8.3728 21.232 8.4931 12.74 0.18659 21.232 8.4931 21.232 8.4931zm-38.22 28.168v4.3213c5.0096 1.0243 8.4931 3.1974 8.4931 5.7314 0 3.5167-6.656 6.3699-14.863 6.3699s-14.863-2.8532-14.863-6.3699c0-2.534 3.4834-4.707 8.4931-5.7314v-4.3211c-7.7135 1.3355-12.74 5.076-12.74 10.052 0 6.2497 7.8586 10.616 19.11 10.616s19.11-4.3668 19.11-10.616c0-4.9764-5.0262-8.7168-12.74-10.052z" fill="#af0303" stroke="#730202" stroke-linejoin="round" stroke-width="1.7113"/></svg>
<?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"><rect x="-.0013123" y="-.0014381" width="93.668" height="93.679" ry="0" fill="#9e9e9e" stroke="#fff" stroke-width=".24146"/><g transform="matrix(-.1153 0 0 .1153 66.052 27.65)" fill="#5002b1" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" stroke="#1c014e" stroke-width="11.668"><path class="fil0" d="m236 19 67 91-196 140h-55c1-17 9-33 29-40 17-6 27-15 39-29l20 20c7 7 18-4 11-12l-22-21c4-6 6-12 8-19l26 26c7 7 18-4 11-12l-32-32c2-8 2-16 3-25l27 28c8 7 19-4 12-12l-39-38c0-8-1-15-1-23zm-175 265c-18 4-17 13 4 16 19 3 50 3 70 0 21-3 22-11 4-15l3-2 3-3 6-4 30-21 132-96s9-13 7-21c-1-3-4-9-8-15l-197 142-5 1-56 1c1 5 4 13 7 17zm-14-3c-62 7-36 35 53 33 126-2 81-33 70-28 14 4 21 11-11 18-47 10-119 4-137-6-16-10 27-17 25-17zm87 8c16 2 17 3 0 6-19 3-49 3-68 0-16-2-16-3-1-6 2 2 4 4 6 5l58-2z" fill="#5002b1" stroke="#1c014e" stroke-width="11.668"/></g></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"><g transform="matrix(-.1153 0 0 .1153 66.052 27.65)" fill="#5002b1" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" stroke="#1c014e" stroke-width="11.668"><path class="fil0" d="m236 19 67 91-196 140h-55c1-17 9-33 29-40 17-6 27-15 39-29l20 20c7 7 18-4 11-12l-22-21c4-6 6-12 8-19l26 26c7 7 18-4 11-12l-32-32c2-8 2-16 3-25l27 28c8 7 19-4 12-12l-39-38c0-8-1-15-1-23zm-175 265c-18 4-17 13 4 16 19 3 50 3 70 0 21-3 22-11 4-15l3-2 3-3 6-4 30-21 132-96s9-13 7-21c-1-3-4-9-8-15l-197 142-5 1-56 1c1 5 4 13 7 17zm-14-3c-62 7-36 35 53 33 126-2 81-33 70-28 14 4 21 11-11 18-47 10-119 4-137-6-16-10 27-17 25-17zm87 8c16 2 17 3 0 6-19 3-49 3-68 0-16-2-16-3-1-6 2 2 4 4 6 5l58-2z" fill="#5002b1" stroke="#1c014e" stroke-width="11.668"/></g></svg>
<?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"><rect x="-.0013123" y="-.0014381" width="93.668" height="93.679" ry="0" fill="#ea9c1f" stroke="#fff" stroke-width=".24146"/><g transform="matrix(-.2362 0 0 .2362 86.205 7.6013)" fill="#5002b1" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" stroke="#1c014e" stroke-width="11.668"><path class="fil0" d="m236 19 67 91-196 140h-55c1-17 9-33 29-40 17-6 27-15 39-29l20 20c7 7 18-4 11-12l-22-21c4-6 6-12 8-19l26 26c7 7 18-4 11-12l-32-32c2-8 2-16 3-25l27 28c8 7 19-4 12-12l-39-38c0-8-1-15-1-23zm-175 265c-18 4-17 13 4 16 19 3 50 3 70 0 21-3 22-11 4-15l3-2 3-3 6-4 30-21 132-96s9-13 7-21c-1-3-4-9-8-15l-197 142-5 1-56 1c1 5 4 13 7 17zm-14-3c-62 7-36 35 53 33 126-2 81-33 70-28 14 4 21 11-11 18-47 10-119 4-137-6-16-10 27-17 25-17zm87 8c16 2 17 3 0 6-19 3-49 3-68 0-16-2-16-3-1-6 2 2 4 4 6 5l58-2z" fill="#5002b1" stroke="#1c014e" stroke-width="11.668"/></g></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"><g transform="matrix(-.2362 0 0 .2362 86.205 7.6013)" fill="#5002b1" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" stroke="#1c014e" stroke-width="11.668"><path class="fil0" d="m236 19 67 91-196 140h-55c1-17 9-33 29-40 17-6 27-15 39-29l20 20c7 7 18-4 11-12l-22-21c4-6 6-12 8-19l26 26c7 7 18-4 11-12l-32-32c2-8 2-16 3-25l27 28c8 7 19-4 12-12l-39-38c0-8-1-15-1-23zm-175 265c-18 4-17 13 4 16 19 3 50 3 70 0 21-3 22-11 4-15l3-2 3-3 6-4 30-21 132-96s9-13 7-21c-1-3-4-9-8-15l-197 142-5 1-56 1c1 5 4 13 7 17zm-14-3c-62 7-36 35 53 33 126-2 81-33 70-28 14 4 21 11-11 18-47 10-119 4-137-6-16-10 27-17 25-17zm87 8c16 2 17 3 0 6-19 3-49 3-68 0-16-2-16-3-1-6 2 2 4 4 6 5l58-2z" fill="#5002b1" stroke="#1c014e" stroke-width="11.668"/></g></svg>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment