Skip to content

Add a theme-aware reading width slider - #84

Merged
minchenlee merged 3 commits into
minchenlee:mainfrom
chungchihhan:codex/reading-width-slider
Nov 5, 2026
Merged

minchenlee merged 3 commits into
minchenlee:mainfrom
chungchihhan:codex/reading-width-slider

Conversation

@chungchihhan

Copy link
Copy Markdown
Contributor

Add a theme-aware slider at the bottom-right of the document to adjust the maximum reading-column width. Changes reflow text and diagrams immediately, clear measured heights and remeasure the virtual window; the selected cap is saved on release.

  • Default width stays 720 logical pixels; the range starts at 480 (or available width if narrower) and ends at the available reader width, capped at 1920.
  • Account for the sidebar, divider and reader padding so the thumb reaches the endpoint when the column fills the space. Preserve the saved requested cap across temporary window narrowing.
  • Use palette colors for the rail, handle and border. Place keyboard shortcuts on the left and word-count/read-time on the right in the row above the slider.
  • Hide the control in raw/data/mindmap views, settings and overlays. Side-panel width caps remain unchanged.

This PR branches directly from upstream main and is independent of #82 and #83. It changes only reading layout, preference storage and footer controls; renderer, preview modal, dependencies and project-control documents are unchanged. It is separated as requested in review and may need rebasing after the pointer-support PRs land.

Validation: cargo check --locked, cargo fmt --all --check and git diff --check passed on macOS arm64. Existing import/future-compatibility warnings remain. No automated test suite or fresh standalone native visual check was run; the control was previously tried as part of the combined experimental build. Manual checks: text/diagram reflow while dragging, sidebar/window resizing, light/dark colors, restart persistence and hidden states.

minchenlee and others added 2 commits October 26, 2026 16:42
Resolve conflicts with MDV-048 pointer support: the editor keeps main's
WheelGate and margin click area at the saved reading width, the reader
column keeps its id, and the status footer keeps main's statistic cycling
inside the shortcut row above the width slider.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDZchfH1Ariata8rWBTLg5
The floating slider covered every document and pushed the shortcut and
status pills up. Reading width is now a Settings row with four presets
(Narrow, Default, Wide, Full), stepped with Cmd-Option-[ and ], and
listed in the View menu, the command palette, and the shortcut sheet.

Each preset is a width in ems of the body size, so a font zoom keeps
the characters per line. Default is 45 em, the old 720 px at 16 px.
Prefs store the preset name; an unknown value, such as the pixel width
an earlier build saved, falls back to Default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDZchfH1Ariata8rWBTLg5
@minchenlee
minchenlee merged commit 9c48eab into minchenlee:main Nov 5, 2026
5 checks passed
minchenlee added a commit that referenced this pull request Nov 10, 2026
docs: MDV-048 merged; plan completed; track #82 and #84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants