Files
tty7/src/ui
Bougie d3887cd5f2 fix(document): size the docked column's content in points, not percent (#1150) (#1196)
A docked document was drawn in a fraction of the space its column had. The
column itself was sized correctly — `document_body_px` and
`document_column_px` agreed with what the column measured on screen — but
the box holding the surface was `w_full()`, a share of whatever the flex
ancestor chain resolved to, and on a fractional display scale that share
resolved against the wrong ancestor entirely.

On a 1.75x Wayland surface (GNOME's `scale-monitor-framebuffer`), a
404-point column handed its file a 123-point content box, so the editor
laid out at a fifth of the width it was given, soft-wrapped every few
characters, and left the rest of the column empty. The same build under
X11, where the scale is 1, put the file across the column.

    surface              scale 1      scale 1.75   fixed
    column (measured)      404.0          403.4   403.4
    content box             404.0         123.4   403.4
    editor                  380.0          99.4   380.6
    wrap width              302.9          22.3   303.4

The column is sized in points where it is drawn, so its content is sized
the same way: a point count has no ancestor to be resolved against, and
reads the same at every scale. `DOCUMENT_RULE` names the rule on the
column's left edge so the border and the width that leaves room for it
cannot drift apart.

Fill is untouched — it never went through this box — and the diff view
docked beside the terminal gets the same fix for free.
2026-10-22 17:45:44 +08:00
..