dont know what i did

This commit is contained in:
Jan Pleterski
2026-11-28 22:22:21 +01:00
parent 258303deb8
commit 05399092b8
33 changed files with 77 additions and 38 deletions
+28 -11
View File
@@ -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)
+4 -3
View File
@@ -193,7 +193,7 @@ class _TargetScreenState extends State<TargetScreen> {
);
}
// 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<TargetScreen> {
);
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,
+25 -15
View File
@@ -434,14 +434,28 @@ class _TargetViewScreenState extends State<TargetViewScreen> {
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<TargetViewScreen> {
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,
),
],
),