move the pin toggle to the pane leading slot

The pin/unpin toggle is a mode control, not navigation — grouping it
with back/forward/jump implied they work alike. Pull it out of
ReaderActionBar into a standalone ReaderPinButton placed before the
title (ClidePaneChrome.leading), leaving the right-hand navigator to
back/forward/jump-to-pin/edit. Applies to all three readers. (T-198)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-01 15:26:23 +02:00
co-authored by Claude Opus 4.8
parent e2b43b2a86
commit 5b3fbb994f
5 changed files with 46 additions and 30 deletions
@@ -103,6 +103,10 @@ class _MarkdownViewerState extends State<MarkdownViewer> {
return ClidePaneChrome(
title: _path ?? 'viewer',
subtitle: '${_content!.split('\n').length} lines',
leading: ReaderPinButton(
pinned: _nav?.hasPinned ?? false,
onTap: _path != null ? _onPin : null,
),
trailing: [
ReaderActionBar(
canGoBack: _nav?.canGoBack ?? false,
@@ -110,7 +114,6 @@ class _MarkdownViewerState extends State<MarkdownViewer> {
hasPinned: _nav?.hasPinned ?? false,
onBack: (_nav?.canGoBack ?? false) ? _onBack : null,
onForward: (_nav?.canGoForward ?? false) ? _onForward : null,
onPin: _path != null ? _onPin : null,
onJumpToPin: (_nav?.hasPinned ?? false) ? _onJumpToPin : null,
onEdit: _path != null ? _onEdit : null,
),