Modules/android/assets/rsc/markdown
Шурупов Илья Викторович 62cced3eda Markdown editor: scroll-synced panes, images, Ctrl+wheel zoom
Scroll sync replaces caret following. ScrollView gains setOnScrolled,
reported whenever the applied offset changes. In Split mode the pane that
scrolls first leads until the next tick, and the other jumps to the block
or source line at the leader's top edge, so the panes never chase each
other. Moving the caret alone no longer moves the preview.

Images render instead of showing as links. ImageLoader is a new optional Ui
service, like TextMetrics: WidgetsApp installs CanvasImageLoader, which
caches nanovg images by path (Canvas::imageSize added). MarkdownImage
shrinks large images to the column width, keeps small ones at natural
size, and shows an alt-text placeholder when the file is missing.
Relative paths resolve against MarkdownView::setBaseDirectory. The gallery
uses rsc for the sample and the opened file's folder otherwise. A sample
diagram ships in Widgets/examples/rsc/markdown and is copied next to the
fonts and linked into the Android assets.

Ctrl+wheel anywhere over the editor zooms both panes together, from 60%
to 250% in 10% steps, keeping the top line in place. The status line shows
the zoom. TextArea gets a font scale plus line geometry queries
(topOfLineContaining, positionAtTop) that the sync uses.

List bullets are drawn shapes now, because Cantarell has no glyphs for the
nested markers.
2026-10-24 09:17:17 +03:00

Symbolic link
1 line
No EOL
38 B
Text

../../../Widgets/examples/rsc/markdown