orkmode/ui
Levi Neely bfc0c80d09 Scroll to the body segment that contains a link offset
Link reveal previously scrolled only to the section top (offset > 0 just
chose Beginning vs Contain). Thread the body offset through to the
rendered segment so the view scrolls to the matched segment, keeping the
existing segmented body rendering (text/code/table/list).

- The bodyParts builder now records each segment's startLine (the body
  line index where it begins) for text, list, code, and table parts,
  tracked through the line-categorizing loop and pushText.
- A new delegate function offsetToY(bodyOffset) converts the offset to a
  body line, finds the last segment whose startLine <= that line, and
  returns that segment's y relative to the delegate via mapToItem.
- On sectionRevealed with offset > 0, position the row at the viewport
  top (which realizes the delegate), then nudge contentY by offsetToY so
  the matched segment sits at the top, clamped to the content bounds.

The offset->line->segment selection was verified with a standalone
harness replicating the builder and selection logic: for a body mixing
intro text, a code block, a paragraph, a table, trailing text, and a
list, every line maps to the segment that actually contains it. The
final pixel scroll uses standard Qt Quick coordinate mapping; it needs a
rendered scene to verify visually, which is not possible headlessly.
Granularity is now segment-precise; intra-segment line precision is not
attempted (text segments are Labels without glyph positioning).
2026-10-02 12:26:09 +02:00
..
qml Scroll to the body segment that contains a link offset 2026-10-02 12:26:09 +02:00
src Add an org path setting with a directory picker to Settings 2026-10-02 12:11:19 +02:00
CMakeLists.txt Add font customization and UI scaling 2026-10-01 09:11:45 +02:00