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
+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,
),
],
),