UI fixes and league

This commit is contained in:
Jan Pleterski
2026-11-28 12:22:02 +01:00
parent 2fc741a9f6
commit 258303deb8
118 changed files with 1439 additions and 537 deletions
+18 -16
View File
@@ -193,26 +193,27 @@ class _TargetScreenState extends State<TargetScreen> {
);
}
// A ready camera: the hit colour over the whole tile, a solid icon and the
// name in one colour. One not set up is dashed.
// A ready camera: a normal card outlined in the hit colour, its icon on a
// soft badge of that colour, the name in the text colour. One not set up is
// dashed, with a plus.
Widget _cameraTile(AppSettings s, Palette c, int position, bool ready) {
final name = '${s.t('Camera')} $position';
final fill = c.accent;
final fg = ready ? Palette.onColor(fill) : c.ink2;
final content = Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ready
? Icon(Icons.videocam_rounded, size: 36, color: fg)
: Container(
width: 48,
height: 48,
decoration: BoxDecoration(color: c.tile, borderRadius: BorderRadius.circular(14)),
child: Icon(Icons.add_rounded, size: 26, color: c.muted),
),
const SizedBox(height: 8),
Text(name, textAlign: TextAlign.center, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: fg)),
Container(
width: 48,
height: 48,
decoration: BoxDecoration(color: ready ? c.accentSoft : c.tile, borderRadius: BorderRadius.circular(14)),
child: ready
? Icon(Icons.videocam_rounded, size: 26, color: c.accent)
: Icon(Icons.add_rounded, size: 26, color: c.muted),
),
const SizedBox(height: 10),
Text(name,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: ready ? c.ink : c.ink2)),
if (!ready)
Text(s.t('Not set up'), textAlign: TextAlign.center, style: TextStyle(fontSize: 11.5, color: c.faint)),
],
@@ -220,8 +221,8 @@ class _TargetScreenState extends State<TargetScreen> {
);
return AppCard(
dashed: !ready,
color: ready ? fill : null,
borderColor: ready ? fill : null,
borderColor: ready ? c.accent : null,
borderWidth: ready ? 1.5 : 1,
padding: const EdgeInsets.all(10),
onTap: () => _openPosition(position),
child: content,
@@ -244,6 +245,7 @@ class _TargetScreenState extends State<TargetScreen> {
style: s.target,
hits: _lastHits?.bullets ?? const [],
hitColor: s.bulletColor,
zoomToHits: true,
),
),
const SizedBox(width: 12),