From ca5628482666a94727fec02ee160853dd367316d Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Sat, 4 Jan 2025 15:56:33 +0100 Subject: [PATCH] Fix shape detection list tile not clickable --- app/lib/dialogs/background/dialog.dart | 2 +- app/lib/dialogs/constraints.dart | 4 +--- app/lib/dialogs/sync.dart | 1 + app/lib/selections/tools/pen.dart | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/lib/dialogs/background/dialog.dart b/app/lib/dialogs/background/dialog.dart index 186b05a347ec..32dc27b032d2 100644 --- a/app/lib/dialogs/background/dialog.dart +++ b/app/lib/dialogs/background/dialog.dart @@ -104,7 +104,7 @@ class BackgroundDialog extends StatelessWidget { onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context).ok), + child: Text(AppLocalizations.of(context).save), onPressed: () { context.read().add(DocumentBackgroundsChanged( [if (background != null) background!])); diff --git a/app/lib/dialogs/constraints.dart b/app/lib/dialogs/constraints.dart index 86c2c9996578..1facb32815d8 100644 --- a/app/lib/dialogs/constraints.dart +++ b/app/lib/dialogs/constraints.dart @@ -67,14 +67,12 @@ class _ConstraintsViewState extends State { children: [ ExpansionPanel( isExpanded: opened, + canTapOnHeader: true, headerBuilder: (context, isExpanded) => Wrap( children: [ ListTile( title: Text(AppLocalizations.of(context).constraints), leading: const PhosphorIcon(PhosphorIconsLight.selection), - onTap: () => setState(() { - opened = !isExpanded; - }), trailing: DropdownMenu( dropdownMenuEntries: all.entries .map((e) => DropdownMenuEntry( diff --git a/app/lib/dialogs/sync.dart b/app/lib/dialogs/sync.dart index ae2a7608d0c4..5adc83d65192 100644 --- a/app/lib/dialogs/sync.dart +++ b/app/lib/dialogs/sync.dart @@ -61,6 +61,7 @@ class _SyncDialogState extends State { children: [ ...service.syncs.asMap().entries.map((entry) => ExpansionPanel( + canTapOnHeader: true, isExpanded: _openedPanels.contains(entry.key), headerBuilder: (context, isExpanded) => ListTile( diff --git a/app/lib/selections/tools/pen.dart b/app/lib/selections/tools/pen.dart index 8efe4e266f57..cada4649385a 100644 --- a/app/lib/selections/tools/pen.dart +++ b/app/lib/selections/tools/pen.dart @@ -54,6 +54,7 @@ class __ShapeDetectionViewState extends State<_ShapeDetectionView> { }, children: [ ExpansionPanel( + canTapOnHeader: true, headerBuilder: (BuildContext context, bool isExpanded) { return ListTile( title: Text(AppLocalizations.of(context).shapeDetection),