diff --git a/assets/backgrounds/t01_dark.webp b/assets/backgrounds/t01_dark.webp deleted file mode 100644 index 14ad2ce..0000000 Binary files a/assets/backgrounds/t01_dark.webp and /dev/null differ diff --git a/assets/backgrounds/t01_light.webp b/assets/backgrounds/t01_light.webp deleted file mode 100644 index d42bc15..0000000 Binary files a/assets/backgrounds/t01_light.webp and /dev/null differ diff --git a/assets/backgrounds/t05_dark.webp b/assets/backgrounds/t05_dark.webp index 4b8ff8a..7e1a2a2 100644 Binary files a/assets/backgrounds/t05_dark.webp and b/assets/backgrounds/t05_dark.webp differ diff --git a/assets/backgrounds/t05_light.webp b/assets/backgrounds/t05_light.webp index d3db2e1..d149dc5 100644 Binary files a/assets/backgrounds/t05_light.webp and b/assets/backgrounds/t05_light.webp differ diff --git a/assets/backgrounds/t11_dark.webp b/assets/backgrounds/t11_dark.webp new file mode 100644 index 0000000..174f380 Binary files /dev/null and b/assets/backgrounds/t11_dark.webp differ diff --git a/assets/backgrounds/t11_light.webp b/assets/backgrounds/t11_light.webp new file mode 100644 index 0000000..096c910 Binary files /dev/null and b/assets/backgrounds/t11_light.webp differ diff --git a/assets/backgrounds/t14_dark.webp b/assets/backgrounds/t14_dark.webp new file mode 100644 index 0000000..b2f3afa Binary files /dev/null and b/assets/backgrounds/t14_dark.webp differ diff --git a/assets/backgrounds/t14_light.webp b/assets/backgrounds/t14_light.webp new file mode 100644 index 0000000..86126e6 Binary files /dev/null and b/assets/backgrounds/t14_light.webp differ diff --git a/assets/backgrounds/t19_dark.webp b/assets/backgrounds/t19_dark.webp deleted file mode 100644 index e8dcb84..0000000 Binary files a/assets/backgrounds/t19_dark.webp and /dev/null differ diff --git a/assets/backgrounds/t19_light.webp b/assets/backgrounds/t19_light.webp deleted file mode 100644 index c00d4fa..0000000 Binary files a/assets/backgrounds/t19_light.webp and /dev/null differ diff --git a/assets/backgrounds/t40_dark.webp b/assets/backgrounds/t40_dark.webp new file mode 100644 index 0000000..c189bc8 Binary files /dev/null and b/assets/backgrounds/t40_dark.webp differ diff --git a/assets/backgrounds/t40_light.webp b/assets/backgrounds/t40_light.webp new file mode 100644 index 0000000..a29d891 Binary files /dev/null and b/assets/backgrounds/t40_light.webp differ diff --git a/assets/backgrounds/t42_dark.webp b/assets/backgrounds/t42_dark.webp deleted file mode 100644 index aae8ac0..0000000 Binary files a/assets/backgrounds/t42_dark.webp and /dev/null differ diff --git a/assets/backgrounds/t42_light.webp b/assets/backgrounds/t42_light.webp deleted file mode 100644 index bcb1b61..0000000 Binary files a/assets/backgrounds/t42_light.webp and /dev/null differ diff --git a/assets/backgrounds/t72_dark.webp b/assets/backgrounds/t72_dark.webp index 58bb036..b550f96 100644 Binary files a/assets/backgrounds/t72_dark.webp and b/assets/backgrounds/t72_dark.webp differ diff --git a/assets/backgrounds/t72_light.webp b/assets/backgrounds/t72_light.webp index 7eb4535..28f31d8 100644 Binary files a/assets/backgrounds/t72_light.webp and b/assets/backgrounds/t72_light.webp differ diff --git a/assets/backgrounds/t75_dark.webp b/assets/backgrounds/t75_dark.webp index ac1df6b..c015bfc 100644 Binary files a/assets/backgrounds/t75_dark.webp and b/assets/backgrounds/t75_dark.webp differ diff --git a/assets/backgrounds/t75_light.webp b/assets/backgrounds/t75_light.webp index 4c58175..890d21e 100644 Binary files a/assets/backgrounds/t75_light.webp and b/assets/backgrounds/t75_light.webp differ diff --git a/assets/backgrounds/t78_dark.webp b/assets/backgrounds/t78_dark.webp index 3007676..d8e088c 100644 Binary files a/assets/backgrounds/t78_dark.webp and b/assets/backgrounds/t78_dark.webp differ diff --git a/assets/backgrounds/t78_light.webp b/assets/backgrounds/t78_light.webp index 4f476c1..9218afc 100644 Binary files a/assets/backgrounds/t78_light.webp and b/assets/backgrounds/t78_light.webp differ diff --git a/assets/backgrounds/t79_dark.webp b/assets/backgrounds/t79_dark.webp index aa640e5..c517e94 100644 Binary files a/assets/backgrounds/t79_dark.webp and b/assets/backgrounds/t79_dark.webp differ diff --git a/assets/backgrounds/t79_light.webp b/assets/backgrounds/t79_light.webp index 40eb6d3..1005ed6 100644 Binary files a/assets/backgrounds/t79_light.webp and b/assets/backgrounds/t79_light.webp differ diff --git a/assets/targets/v5/t01.webp b/assets/targets/v5/t01.webp deleted file mode 100644 index 5749ae9..0000000 Binary files a/assets/targets/v5/t01.webp and /dev/null differ diff --git a/assets/targets/v5/t11.webp b/assets/targets/v5/t11.webp new file mode 100644 index 0000000..079ad2b Binary files /dev/null and b/assets/targets/v5/t11.webp differ diff --git a/assets/targets/v5/t14.webp b/assets/targets/v5/t14.webp new file mode 100644 index 0000000..2ca3d1b Binary files /dev/null and b/assets/targets/v5/t14.webp differ diff --git a/assets/targets/v5/t19.webp b/assets/targets/v5/t19.webp deleted file mode 100644 index f540856..0000000 Binary files a/assets/targets/v5/t19.webp and /dev/null differ diff --git a/assets/targets/v5/t40.webp b/assets/targets/v5/t40.webp new file mode 100644 index 0000000..8fa2ba2 Binary files /dev/null and b/assets/targets/v5/t40.webp differ diff --git a/assets/targets/v5/t42.webp b/assets/targets/v5/t42.webp deleted file mode 100644 index df7c769..0000000 Binary files a/assets/targets/v5/t42.webp and /dev/null differ diff --git a/lib/models/target_style.dart b/lib/models/target_style.dart index db04045..cf172ed 100644 --- a/lib/models/target_style.dart +++ b/lib/models/target_style.dart @@ -60,20 +60,21 @@ class TargetStyle { TargetStyle(79, 'Dan državnosti', 'Statehood Day', 'Staatsfeiertag', TargetGroup.holiday, Color(0xFF1C4FA0)), ]; - /// The designs the app ships, in picker order (light to dark, then by - /// colour round the wheel: a 3 × 3 grid). The rest of the v5 set - /// (FigCraft Designs/target-designs/v5) is not used for now; to bring one - /// back, add its line here and its webp to assets/targets/v5. + /// The designs the app ships, in picker order (a 3 × 3 grid). The rest of + /// the v5 set (FigCraft Designs/target-designs/v5) is not used for now; to + /// bring one back, add its line here and its webp to assets/targets/v5 (and + /// its backgrounds to assets/backgrounds). A saved id that is no longer + /// here (1, 19, 42 from earlier versions) falls back to the default. static const List all = [ fallback, - TargetStyle(42, 'ISSF ecru', 'ISSF ecru', 'ISSF Ecru', TargetGroup.design, Color(0xFFE8D9B0)), - TargetStyle(7, 'Sončno rumena', 'Sunny yellow', 'Sonnengelb', TargetGroup.classic, Color(0xFFFFA000)), - TargetStyle(19, 'Oranžna', 'Orange', 'Orange', TargetGroup.classic, Color(0xFFFF5A00)), TargetStyle(5, 'Plameni', 'Flames', 'Flammen', TargetGroup.classic, Color(0xFFFF3D00)), - TargetStyle(61, 'Cvetlice', 'Flowers', 'Blumen', TargetGroup.design, Color(0xFFFF6FB0)), + TargetStyle(7, 'Sončno rumena', 'Sunny yellow', 'Sonnengelb', TargetGroup.classic, Color(0xFFFFA000)), TargetStyle(18, 'Ledeni kristal', 'Ice crystal', 'Eiskristall', TargetGroup.classic, Color(0xFF00B8FF)), + TargetStyle(40, 'Kovinar', 'Kovinar', 'Kovinar', TargetGroup.design, Color(0xFF12855C)), TargetStyle(53, 'Kamuflaža', 'Camouflage', 'Tarnmuster', TargetGroup.design, Color(0xFF3E4A26)), - TargetStyle(1, 'Lovorov venec', 'Laurel wreath', 'Lorbeerkranz', TargetGroup.classic, Color(0xFF3E8A1E)), + TargetStyle(61, 'Cvetlice', 'Flowers', 'Blumen', TargetGroup.design, Color(0xFFFF6FB0)), + TargetStyle(11, 'Galaksija', 'Galaxy', 'Galaxie', TargetGroup.classic, Color(0xFF6A2DFF)), + TargetStyle(14, 'Mavrica', 'Rainbow', 'Regenbogen', TargetGroup.classic, Color(0xFF7A5CFF)), ]; @override diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index df2a5b6..70ff1ef 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -67,18 +67,35 @@ class SettingsScreen extends StatelessWidget { ), ), // Hit colour and target design are picked in one sheet + // The target itself is the row's icon, with the hit colour + // as a dot on it; names in the subtitle SettingsTile( - icon: Icons.track_changes_rounded, - title: t('Hits and target'), - valueLeading: Row( - mainAxisSize: MainAxisSize.min, - children: [ - _ColorDot(s.bulletColor, size: 16), - const SizedBox(width: 8), - TargetThumb(s.target, size: 26), - ], + leading: SizedBox( + width: 34, + height: 34, + child: Stack( + clipBehavior: Clip.none, + children: [ + TargetThumb(s.target, size: 34), + Positioned( + right: -3, + bottom: -3, + child: Container( + width: 14, + height: 14, + decoration: BoxDecoration( + color: s.bulletColor, + shape: BoxShape.circle, + border: Border.all(color: c.card, width: 2), + ), + ), + ), + ], + ), ), - value: s.target.name(s.language), + title: t('Hits and target'), + subtitle: '${s.target.name(s.language)} · ' + '${s.holidayColorActive ? s.holiday!.name : t(s.bulletColorName)}', onTap: () => showAppearanceSheet(context), ), ]), @@ -383,7 +400,7 @@ void showAppearanceSheet(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - SheetTitle(s.t('Appearance'), trailing: TargetThumb(s.target, size: 52)), + SheetTitle(s.t('Hits and target')), Kicker(s.t('Bullet color'), padding: const EdgeInsets.only(bottom: 12)), // During a holiday its colour gets its own line first (and is the // one in use until another is picked) diff --git a/lib/screens/target_screen.dart b/lib/screens/target_screen.dart index 807ffcc..73cd0f8 100644 --- a/lib/screens/target_screen.dart +++ b/lib/screens/target_screen.dart @@ -193,7 +193,7 @@ class _TargetScreenState extends State { ); } - // A ready camera: a normal card outlined in the hit colour, its icon on a + // A ready camera: a normal card thinly outlined and glowing 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) { @@ -221,8 +221,9 @@ class _TargetScreenState extends State { ); return AppCard( dashed: !ready, - borderColor: ready ? c.accent : null, - borderWidth: ready ? 1.5 : 1, + // Thin, softened outline with a small glow in the hit colour + borderColor: ready ? c.accent.withValues(alpha: 0.6) : null, + glow: ready ? c.accent : null, padding: const EdgeInsets.all(10), onTap: () => _openPosition(position), child: content, diff --git a/lib/screens/target_view.dart b/lib/screens/target_view.dart index 944b45b..36b066b 100644 --- a/lib/screens/target_view.dart +++ b/lib/screens/target_view.dart @@ -434,14 +434,28 @@ class _TargetViewScreenState extends State { 12 + MediaQuery.paddingOf(context).bottom), child: Row( children: [ - // A session: its target list, to see, edit and delete each one. - // A single target: correct its hits. - SquareButton( - size: 52, - icon: Icons.edit_outlined, - tooltip: s.t(widget.isCombinedView ? 'Edit' : 'Edit target'), - onTap: widget.isCombinedView ? _openSession : _editTarget, - ), + // A single target: delete on the left, out of the thumb's easy + // reach, and correcting its hits on the right. A session: its + // target list on the left (to see, edit and delete each one) and + // the chart toggle on the right. The combined view has no delete: + // it would remove an arbitrary one of its targets; sessions are + // deleted from Knjiga. + if (widget.isCombinedView) + SquareButton( + size: 52, + icon: Icons.edit_outlined, + tooltip: s.t('Edit'), + onTap: _openSession, + ) + else + SquareButton( + size: 52, + icon: Icons.delete_outline_rounded, + color: c.red, + background: c.redSoft, + tooltip: s.t('Delete'), + onTap: _deleteTarget, + ), const SizedBox(width: 10), Expanded( child: PrimaryButton( @@ -457,15 +471,11 @@ class _TargetViewScreenState extends State { onTap: () => setState(() => _showChart = !_showChart), ) else - // The combined view shows a whole session; deleting would remove an - // arbitrary one of its targets. Sessions are deleted from Knjiga. SquareButton( size: 52, - icon: Icons.delete_outline_rounded, - color: c.red, - background: c.redSoft, - tooltip: s.t('Delete'), - onTap: _deleteTarget, + icon: Icons.edit_outlined, + tooltip: s.t('Edit target'), + onTap: _editTarget, ), ], ), diff --git a/lib/widgets/ui.dart b/lib/widgets/ui.dart index b2e3dc4..ed4ed1d 100644 --- a/lib/widgets/ui.dart +++ b/lib/widgets/ui.dart @@ -375,6 +375,7 @@ class AppCard extends StatelessWidget { final Color? borderColor; final double borderWidth; final bool dashed; + final Color? glow; // a soft halo in this colour round the card const AppCard({ super.key, @@ -387,6 +388,7 @@ class AppCard extends StatelessWidget { this.borderColor, this.borderWidth = 1, this.dashed = false, + this.glow, }); @override @@ -408,6 +410,14 @@ class AppCard extends StatelessWidget { ); if (dashed) { card = CustomPaint(painter: _DashedBorder(color: c.line, radius: radius), child: card); + } else if (glow != null) { + card = DecoratedBox( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(radius), + boxShadow: [BoxShadow(color: glow!.withValues(alpha: c.isDark ? 0.28 : 0.22), blurRadius: 14)], + ), + child: card, + ); } else if (!c.isDark && color == null) { card = DecoratedBox( decoration: BoxDecoration(borderRadius: BorderRadius.circular(radius), boxShadow: c.shadow),