feat: accept edge swipes across the whole margin beside the text column

This commit is contained in:
randogoth 2026-10-11 11:53:27 +03:00
parent 56f3d959fa
commit 6f9c0e587a
3 changed files with 70 additions and 9 deletions

View file

@ -97,6 +97,11 @@ class _ReaderScreenState extends State<ReaderScreen> {
dark: Theme.of(context).brightness == Brightness.dark,
).background;
// The 40em column plus its padding: swipes are accepted
// anywhere in the margin beside it.
final contentWidth =
42 * 17.0 * deps.settings.fontScale.value;
return SwipeNavigator(
canGoBack: browser.canGoBack,
canGoForward: browser.canGoForward,
@ -105,6 +110,7 @@ class _ReaderScreenState extends State<ReaderScreen> {
backTitle: browser.backPage.value?.title,
forwardTitle: browser.forwardPage.value?.title,
background: peekBackground,
contentWidth: page == null ? null : contentWidth,
onBack: browser.back,
onForward: browser.forward,
child: Stack(