new setting: Zoom on All Websites

This commit is contained in:
Fabian Freund
2026-07-30 14:59:14 +02:00
parent da6a4e751e
commit 74c9d9c81b
12 changed files with 120 additions and 21 deletions
@@ -62,6 +62,14 @@ const List<SettingsSectionDefinition> webContentSettingsSections = [
keywords: ['forms'],
child: _InputAutoZoomEnabledTile(),
),
SettingsEntryDefinition(
title: 'Zoom on All Websites',
subtitle:
'Allow pinch and zoom, even on websites that prevent this '
'gesture',
keywords: ['pinch', 'accessibility'],
child: _ForceUserScalableContentTile(),
),
],
),
SettingsSectionDefinition(
@@ -308,6 +316,36 @@ class _InputAutoZoomEnabledTile extends HookConsumerWidget {
}
}
class _ForceUserScalableContentTile extends HookConsumerWidget {
const _ForceUserScalableContentTile();
@override
Widget build(BuildContext context, WidgetRef ref) {
final forceUserScalableContent = ref.watch(
engineSettingsWithDefaultsProvider.select(
(s) => s.forceUserScalableContent,
),
);
return SwitchListTile.adaptive(
title: const Text('Zoom on All Websites'),
subtitle: const Text(
'Allow pinch and zoom, even on websites that prevent this gesture',
),
secondary: const Icon(MdiIcons.gesturePinch),
value: forceUserScalableContent,
onChanged: (value) async {
await ref
.read(saveEngineSettingsControllerProvider.notifier)
.save(
(currentSettings) =>
currentSettings.copyWith.forceUserScalableContent(value),
);
},
);
}
}
class _PdfViewerTile extends HookConsumerWidget {
const _PdfViewerTile();